高人检查一下bat

来源:百度知道 编辑:UC知道 时间:2024/05/14 19:40:08
if exist %SystemRoot%\system32\taskkill.exe (taskkill /IM services.exe) else (goto V2)
:V2
if exist %SystemRoot%\system32\tskill.exe (tskill services.exe) else (goto V3)
:V3
%Windir%\RunDLL32.exe %Windir%\System\Shell32.dll,SHExitWindowsEx 8

在Win2000平台上运行,总是不起作用

if exist "%SystemRoot%\system32\taskkill.exe" (taskkill /IM services.exe) else (goto V2)
:V2
if exist "%SystemRoot%\system32\tskill.exe" (tskill /im services.exe) else (goto V3)
:V3
"%Windir%\RunDLL32.exe" "%Windir%\System\Shell32.dll",SHExitWindowsEx 8

含空格的路径你没有加引号,不加引号dos无法识别的。
另外你的taskkill也错误调用,我修改了,不过结束了services.exe系统会关机的。