我想用psexec在远程机器上杀死并启动一个程序。我使用以下批处理文件(c:/user/user是psexec根)
cd c:/users/user
psexec \\computername cmd /c "taskkill /im SwyxIt!.exe /f"
psexec \\computername cmd /c "taskkill /im CLMgr.exe /f"
timeout -t 5
psexec \\computername cmd /c "start C:\Program Files (x86)\SwyxIt!\SwyxIt!.exe"但节目还没开始!
另外,如果我像下面的psexec \\computername cmd /c "C:\Program Files (x86)\SwyxIt!\SwyxIt!.exe"那样运行start命令
不会开始的。
如果我在自己的机器start "C:\Program Files (x86)\SwyxIt!\SwyxIt!.exe"上不使用psexec运行命令,它就能正常工作。
有什么建议吗?我在所有远程计算机上都有管理员私密信息。
发布于 2015-10-22 07:49:09
好了,我知道了。我还需要激活-s参数
使用此命令,它可以工作。
psexec -s -i \\computername cmd /c "start /i "SwyxIt!" "C:\Program Files (x86)\SwyxIt!\SwyxIt!.exe""谢谢你的帮助
https://serverfault.com/questions/729185
复制相似问题