桌面能运行,首次进桌面运行不了。
Local $aArray = DriveGetDrive("ALL")For $i = 1 To $aArray
$test = $aArray[$i] & "\XcSoft\" & "[" & @OSVersion & "." & @OSArch & "]" & "test.exe"
If FileExists($test) Then
ShellExecuteWait($test)
Else
EndIf
Next上面代码的目的是搜索移动硬盘或U盘上的一个文件运行。
在桌面运行是没问题的
但封装到win7,首次进桌面的时候用SetupComplete.cmd运行的话就卡在这程序,按ALT+F4才能执行下面的程序
编辑的程序名是calltest.exe
SetupComplete.cmd部分内容:
@echo off
START /WAIT calltest.exe
IF EXIST C:\SWTOOLS RD /Q /S C:\SWTOOLS
IF EXIST "%Systemroot%\Setup\OEMFILES" RD /Q /S %Systemroot%\Setup\OEMFILES
IF EXIST "%Systemroot%\Setup\AIDA64" RD /Q /S %Systemroot%\Setup\AIDA64
IF EXIST "%SYSTEMDRIVE%\AIDA64 REPORTS" RD /Q /S "%SYSTEMDRIVE%\AIDA64 REPORTS"
IF EXIST "%SYSTEMDRIVE%\DRV64" RD /Q /S "%SYSTEMDRIVE%\DRV64"
IF EXIST "%SYSTEMDRIVE%\DRV32" RD /Q /S "%SYSTEMDRIVE%\DRV32"
IF EXIST "%SYSTEMDRIVE%\DRV" RD /Q /S "%SYSTEMDRIVE%\DRV"
IF EXIST "%WINDIR%\System32\DepX64.exe" del /f /q "%WINDIR%\System32\DepX64.exe"
IF EXIST "%WINDIR%\System32\DepX86.exe" del /f /q "%WINDIR%\System32\DepX86.exe"
START /WAIT /B cscript //nologo %Systemroot%\system32\slmgr.vbs -xpr | findstr /I "计算机已永久激活" && GOTO ENDALL
START /WAIT /B cscript //nologo %SYSTEMROOT%\system32\slmgr.vbs -xpr | findstr /I "The machine is permanently activated" && GOTO ENDALL
页:
[1]