PSEXEC arguments


I am using PSEXE command as follow:
psexec.exe "\\efrat" -d -i -e -c -v -u "Efrat Aran"  \\shlomoaran\e\NrGroup2\Install_NrClient.exe /S CENTER_FOLDER="\\shlomoaran\e\NrGroup2" CLIENT_PATH="C:\NrClient\NrClient.exe"

The problem is that the program: Install_NrClient.exe
does not get the arguments:  /S CENTER_FOLDER

The interesting thins is that when I run Install_NrClient.exe from "\\efrat" computer, I can run it without the "-c" and it gets the arguments. So the "-c" enables it to be copied from another computer, but it cause it not to get the arguments
Who is Participating?
epochassetConnect With a Mentor Commented:
Have you tried it without using a network share as the source for install_nrclient.exe?

Also if you dont use -c, you can simply copy install_nrclient.exe to \windows\system32\ on the remote computer and it should work (without -c); or copy it to another location listed in the PATH environment variable.
try escaping the quotes like this,

psexec.exe "\\efrat" -d -i -e -c -v -u "Efrat Aran" \\shlomoaran\e\NrGroup2\Install_NrClient.exe /S CENTER_FOLDER=\"\\shlomoaran\e\NrGroup2\" CLIENT_PATH=\"C:\NrClient\NrClient.exe\"
Also another thing to try would be to escape the quotes in the arguments, and surround the argument list to install_nrclient.exe by additional quotes, like this (i dont remember exactly if this works, but it very well may just do it).

psexec.exe "\\efrat" -d -i -e -c -v -u "Efrat Aran" \\shlomoaran\e\NrGroup2\Install_NrClient.exe "/S CENTER_FOLDER=\"\\shlomoaran\e\NrGroup2\" CLIENT_PATH=\"C:\NrClient\NrClient.exe\""
VapiSoftAuthor Commented:
I tried it (the second one) and it does not work.
The interesting is that what makes it not to work is the -c so maybe there is a bug in the PSEXEC that if you specify -c than it does not take the arguments.
The problem is that if I ommit the -c it tells me that it cannot access the program (that resides on another computer).
VapiSoftAuthor Commented:
Sorry, I found ou that it was just a mistake.
The version of the program from the remote computer did not handle the parameters.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.