为什么有这句:$var = DriveGetDrive("CDROM")
你有2个cdrom才会运行2次.
实在需要可以这样写$var = DriveGetDrive("CDROM")
$s1 = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Temp", "s1")
$s2 = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Temp", "s2")
$s3 = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Temp", "s3")
$s4 = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Temp", "s4")
If Not @error Then
For $i = 1 To $var[0]
DirCopy($var[$i] & '\常用软件', "c:\常用软件", 1)
if $s1 = 0 then
RunWait("C:\WINDOWS\Temp\快速设定分辨率.exe")
Regwrite("HKEY_LOCAL_MACHINE\SOFTWARE\Temp", "s1","REG_SZ","1")
endif
if $s2 = 0 then
RunWait("C:\WINDOWS\Temp\一键填写IP192.168.1.110.bat","",@SW_HIDE)
Regwrite("HKEY_LOCAL_MACHINE\SOFTWARE\Temp", "s2","REG_SZ","1")
endif
if $s3 = 0 then
RunWait("C:\WINDOWS\Temp\智能关闭无用服务.bat","",@SW_HIDE)
Regwrite("HKEY_LOCAL_MACHINE\SOFTWARE\Temp", "s3","REG_SZ","1")
endif
if $s4 = 0 then
RunWait("C:\常用软件\SOFTINST.EXE")
Regwrite("HKEY_LOCAL_MACHINE\SOFTWARE\Temp", "s4","REG_SZ","1")
endif
Next
EndIf
|