41# temp
测试了一下
因为没有现成的inf文件
直接regedit修改HKEY_CURRENT_USER\Environment下的已有变量
然后杀进程、刷新、启进程
结果无效!
另外印象中有直接刷新当前Explorer.exe环境空间的命令行
似 ...
qzwqzw 发表于 2011-5-17 21:07 
试试这样行不行 | @echo off | | title= | | | | :start | | set /p NetConf=请输入你选择的操作(1修改;2还原): | | if /i "%NetConf%" equ "1" (goto 1) else if /i "%NetConf%" equ "2" (goto 2) else (goto :eof) | | | | :1 | | echo. | | Set HDD= | | set /p HDD=完整的路经及文件名[如 d:\temp ]: | | if not exist "%HDD%" (md "%HDD%") | | (echo [Version] | | echo Signature="$CHICAGO$" | | echo. | | echo [DefaultInstall] | | echo AddReg=AddReg | | echo [AddReg] | | echo hkcu,"Environment","TEMP",0x20000,"%HDD%" | | echo hkcu,"Environment","TMP",0x20000,"%HDD%" | | echo [Strings])>>.\Modift.inf | | rundll32 setupapi,InstallHinfSection DefaultInstall 132 .\Modift.inf | | del /f /s /q .\Modift.inf | | taskkill.exe /im explorer.exe /f | | RunDll32 USER32,UpdatePerUserSystemParameters | | start explorer.exe | | exit | | | | :2 | | (echo [Version] | | echo Signature="$CHICAGO$" | | echo. | | echo [DefaultInstall] | | echo AddReg=AddReg | | echo [AddReg] | | echo hkcu,"Environment","TEMP",0x20000,"%%USERPROFILE%%\Local Settings\Temp" | | echo hkcu,"Environment","TMP",0x20000,"%%USERPROFILE%%\Local Settings\Temp" | | echo [Strings])>Modift.inf | | rundll32 setupapi,InstallHinfSection DefaultInstall 132 .\Modift.inf | | del /f /s /q .\Modift.inf | | taskkill.exe /im explorer.exe /f | | RunDll32 USER32,UpdatePerUserSystemParameters | | start explorer.exe | | exitCOPY |
|