
CODE: [Copy to clipboard]问题是这样的:因为bat中需要启动延缓环境变量扩展,所以要执行%comspec% /V:ON%comspec% /V:ON
::cdkey.txt文件中有4个cdkey
set /A cd=%random%"%%"4
set /A b=%cd%+1
set /A a=0
for /f %%i in (D:\game\本地游戏\CS1.5中文硬盘版\CS1.5中文硬盘版\cdkey.txt) do set /A a=a+1 && if "!a!"=="%b%" set cdkey=%%i && goto EOF
:EOF
echo Windows Registry Editor Version 5.00 > c:\123.reg
echo.>> c:\123.reg
echo [HKEY_CURRENT_USER\Software\Valve\CounterStrike\Settings] >> c:\123.reg
echo "Key"="%cdkey%" >> c:\123.reg
CODE: [Copy to clipboard][ Last edited by willsort on 2005-8-2 at 21:12 ]@echo off
if "%1" == "" start %comspec% /V:ON /C %0 $ && goto eof
::cdkey.txt文件中有4个cdkey
set /A cd=%random%"%%"4
set /A b=%cd%+1
set /A a=0
for /f %%i in (D:\game\本地游戏\CS1.5中文硬盘版\CS1.5中文硬盘版\cdkey.txt) do set /A a=a+1 && if "!a!"=="%b%" set cdkey=%%i &&goto chgkey
:chgkey
echo Windows Registry Editor Version 5.00 > c:\123.reg
echo. >> c:\123.reg
echo [HKEY_CURRENT_USER\Software\Valve\CounterStrike\Settings] >> c:\123.reg
echo "Key"="%cdkey%" >> c:\123.reg
regedit /s c:\123.reg
CODE: [Copy to clipboard][ Last edited by willsort on 2005-7-27 at 13:48 ]if "%1" == "" %comspec% /V:ON /C %0 cmdshell & goto :eof
| 欢迎光临 中国DOS联盟论坛 (http://cndos.fam.cx/forum/) | Powered by Discuz! 2.5 |