我有一个从 CMD 运行的脚本正常运行,但是当我从任务调度程序运行它时,尽管它按预期执行了所有操作,但脚本状态挂在“正在运行”
这是脚本:
@echo OFF
tasklist /FI "IMAGENAME eq utorrent.exe" 2>NUL | find /I /N "utorrent.exe">NUL
if "%ERRORLEVEL%"=="0" (echo UTorrent is running nothing to do) ELSE (
echo UTorrent is not running, starting Utorrent!
start C:\Users\Adonis\AppData\Roaming\uTorrent\uTorrent.exe
)
tasklist /FI "IMAGENAME eq steam.exe" 2>NUL | find /I /N "steam.exe">NUL
if "%ERRORLEVEL%"=="0" (echo Steam is running nothing to do) ELSE (
echo Steam is not running, starting Steam!
start X:\Games\SteamLibrary\Steam.exe
)
exit
谁能告诉我为什么会这样?IE 为什么脚本通过调度程序卡在运行状态?
有问题的操作系统是 Windows 8。它设置为仅在用户登录并具有最高权限时运行。
谢谢!