似乎每当我运行我的批处理文件时,一切都会运行,它会进入checkfiles
,但它不运行 if 语句。没有返回任何内容,它只是直接跳到代码的最后一部分。
:file_check
if exist "%psychedelia%\nhc.exe" (goto file_exists) else (timeout /t 1 /nobreak > output)
goto file_check
:file_exists
copy /Y "%~dp0version.txt" "%psychedelia%"
:checkfiles
echo in checkfiles
if exist "%psychedelia%\wa.exe" if exist "%psychedelia%\readme.txt" if exist "%psychedelia%\HD.BLB" if exist "%psychedelia%\smackw32.dll" if exist "%psychedelia%\setup95.exe" if exist "%psychedelia%\WAVistaWin7.exe" (
echo MSGBOX "Thank you for installing the Neverhood. You may now go to your desktop and click on the Orpheus shortcut to play!" > %temp%\TEMPxmessage.vbs
call %temp%\TEMPxmessage.vbs
del %temp%\TEMPxmessage.vbs /f /q
rename "%psychedelia%\nhc.exe" wa.exe
timeout /t 1 /nobreak > output
taskkill.exe /F /IM setup95.exe /T
) else (
echo nonexistent
pause
timeout /t 1 /nobreak > output
goto checkfiles
)
非常感谢所有帮助。