Link to home
Start Free TrialLog in
Avatar of it_
it_

asked on

psexec does not seem to work with windows 2003

when running
psexec \\IP -u <username> -p <password> cmd

I get:
cmd exited on <IP> with error code 1

This does not happen on wndows 2008, Vista etc where the cmd runs succesfully..

when I run

psexec \\IP -u <username> -p <password> c:\windows\notepad.exe

It does kick off notepad I can see in the processes.
ASKER CERTIFIED SOLUTION
Avatar of epochasset
epochasset
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of it_
it_

ASKER


Thanks Epohchasset.

It somehow seems to be only happening with "all" Win 2003 machines all other machines are fine. Using 1.95.
Lets try some variations on the psexec usage.

If you want to spawn a gui app like notepad, your going to want to use psexec's -d flag so it doesnt wait for notepad to close on the other end,

psexec \\IP -d -u <username> -p <password> c:\windows\notepad.exe

Also oftentimes you will want to use psexec through the command interpreter like this,

psexec \\IP -u <username> -p <password> cmd.exe "/c c:\windows\notepad.exe"

Avatar of it_

ASKER


Thanks epochasset!

The thing is I m able to kick off a process but not run commands like cmd. And it is *only* on Win2003 boxes. All other environments work just fine. I tried to search quite a bit to see if there is anything specific about 2003. PSEXECSVC seems to run fine on 2003. This is not one machine. Two different machines and a VM with 2003 that I tried 1.95 with and all seem to have the problem i.e.  

when running
psexec \\IP -u <username> -p <password> cmd

I get back:
cmd exited on <IP> with error code 1
By chance are the 2003 machines attached to an active directory domain?
Avatar of it_

ASKER


Thanks for your continuing help.

Yes the 2003 machines are connected to active directory domain..
Avatar of it_

ASKER

found another solution