PSEXEC arguments

Hi,

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
VapiSoftAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

epochassetCommented:
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\"
0
epochassetCommented:
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\""
0
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).
0
epochassetCommented:
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.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows XP

From novice to tech pro — start learning today.