Running psexec on a remote Windows 7 Enterprise workstation

pstools

I can't seem to get psexec commands to work on a remote Windows 7 Enterprise workstation.

I'm trying to execute the following command:

psexec.exe \\172.16.165.157 -u jc -p testing123 -c -f -i cmd.exe

But I keep getting the error:

PsExec v1.94 - Execute processes remotely
Copyright (C) 2001-2008 Mark Russinovich
Sysinternals - www.sysinternals.com

Error copying C:\WINDOWS\system32\cmd.exe to remote system:
Access is denied.

I'm trying to execute the command from a machine running Windows XP Professional.

Best Answer

I used the -d argument as a workaround. But that means I don’t get back the return code from the process I started remotely.

This is a workaround, but it is not ideal.