
psexec를 사용하여 원격 시스템에서 프로그램을 종료하고 시작하고 싶습니다. 나는 다음 배치 파일을 사용합니다 (c:/users/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"
시작되지 않습니다.
내 컴퓨터에서 psexec 없이 명령을 실행하면 start "C:\Program Files (x86)\SwyxIt!\SwyxIt!.exe"
제대로 작동합니다.
어떤 제안이 있나요? 모든 원격 컴퓨터에 대한 관리자 권한이 있습니다.
답변1
좋아, 이제 알았어. 또한 -s
매개변수를 활성화해야 했습니다.
이 명령을 사용하면 작동합니다
psexec -s -i \\computername cmd /c "start /i "SwyxIt!" "C:\Program Files (x86)\SwyxIt!\SwyxIt!.exe""
당신의 도움에 감사드립니다