PsExec: copying my program not into "system32" folder

Steve picture Steve · Feb 10, 2009 · Viewed 24.2k times · Source

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 \\000.00.00.000 -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

Answer

Alan Mullett picture Alan Mullett · Feb 17, 2009

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.