0
votes

I am trying to run PSExec through a batch file with the following command which runs fine when I execute through my command line:

C:\Program Files (x86)\PSTools\PsExec.exe -s -i 1 -u administrator -p force \135.20.230.160 C:\Program Files (x86)\Tensilica\Xtensa OCD Daemon 9.0.3\xt-ocd.exe

But when I include this command in a batch file (psexec.bat) and try to run it throws an error:

'C:\Program' is not recognized as an internal or external command, operable program or batch file.

How I can fix this?

Both local and remote desktops are Windows 7 64 bit OS.

Thanks for your help.

1

1 Answers

1
votes

Quote file/folder references that include spaces

"C:\Program Files (x86)\PSTools\PsExec.exe" -s -i 1 -u administrator -p force \\135.20.230.160 "C:\Program Files (x86)\Tensilica\Xtensa OCD Daemon 9.0.3\xt-ocd.exe"