问题
I wanna run remote a batch file with PSExec, so my code looks like this:
cd C:\PsTools
PsExec.exe \\<computer> -u <user> -p <password> -s -i <"pathToBatchFile\batch.bat">
exit
After I call the batch file on the remote computer, the application on the remote computer is starting under the SYSTEM account. I wanna start it under another account.
How can I do this?
回答1:
You should not use the -s
switch.
From the docs:
-s Run remote process in the System account.
来源:https://stackoverflow.com/questions/13376907/psexec-run-remote-batch-file