tags:

views:

933

answers:

6

Hi everyone,

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

+1  A: 

Can you XCOPY the installer to a certain place on the remote PC and then PSExec the installer? PSExec shouldn't actually have to copy anything... Let me know if I'm missing something.

routeNpingme
Hi, we can't use xcopy because we can't always be sure we'll have permissions with windows authentication. With psexec, we can specify a username and password.
Steve
+1  A: 

If you don't have full administrative rights on the computer, and are trying to psexec, I question your motives. Can you explain what you are really doing? Who owns the machine?

abelenky
Hi, its an RD machine where I work. We're trying to push out a deployment to several machines instead of installing it by hand. I am one step below the full administrator. I can install anything I want, but it gets tedious over several boxes.
Steve
+2  A: 

Have you tried:

net use G: \\remotecomputer\droppoint mypassword /user:myuser@mydomain
xcopy installer G:
abelenky
Its not ideal, but it looks like that will work just fine. Thanks for the help.
Steve
+1  A: 

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.

Alan Mullett
I can start up the service just fine, I just can't execute the installer from the window folder. If I move it up to the C drive, psexec runs the installer just fine. Thanks for the help.
Steve
A: 

Try using the -w parameter to PsExec to set the working directory for the process on the remote computer. I think the file might still be copied to the system32 directory, but when it is executed the working directory will be the directory specified.

From the PSExec command-line help:

-w   Set the working directory of the process (relative to remote computer).
Adam Porad
A: 

Hey

do you know how can I make local-admin of a remote machine execute some exe with c# ?