Sign up ×
Server Fault is a question and answer site for 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

1 Answer 1

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
Excellent, thank you!! – realtek Dec 12 '14 at 16:02

Your Answer


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.