PsExec: copying the program not into “system32” folder


I can't get PsExec to work. It keeps copying my installer into system32 (where it won't launch). Does anyone know how to copy from the local to the remote computer to a directory that isn't system32? My PsExec command line is

psexec \\ -f -u DOMAIN\meuser -p testpwd -c ..\Installer\test.exe /S

Any help would be greatly appreciated.

EDIT: It won't launch because I don't have full administrative rights on the computer. It will launch from other directories

Best Solution

You need to have admin rights on the target as part of psexec starts up a windows service on the target, and you need admin rights to be able to do that.

psexec copies a psexecsvc file to the admin share and then using remote management starts up a service using that file. It opens up named pipes and uses that for further communication. When it's finished it tidies up after itself.

Related Question