Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

This command copies the program test.exe to the remote system and executes it interactively:

psexec \\marklap -c test.exe

However I need to pass some arguments to the text.exe program.

This doesn't work:

psexec \\marklap -c "test.exe /S"
share|improve this question
add comment

1 Answer

I figured it out. You need to quote the .exe part and then just put the arguments for it after it:

psexec \\marklap -c "test.exe" /S
share|improve this answer
    
Otherwise PsExec thinks it's one file name with spaces in it, which makes sense after some thought. Good catch! –  Jeff McJunkin Aug 13 '10 at 15:30
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.