Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

psexec does not seem to work with windows 2003

Posted on 2009-05-15
7
Medium Priority
?
945 Views
Last Modified: 2013-11-17
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.
0
Comment
Question by:it_
  • 4
  • 3
7 Comments
 
LVL 5

Accepted Solution

by:
epochasset earned 750 total points
ID: 24397804
You can run into problems if youve used different verisons of psexec over time.  First, verify you are using the latest version of psexec.  On the 2003 server, check for a left over psexec service via,

sc query | find /i "psexec"

If one is present stop it via 'net stop' and then delete it via 'sc delete %name%', then try running psexec remotely again.

If none of this helps, try remotely executing different programs to see if its all programs in general or just notepad.exe.  Check that on the 2003 server, notepad.exe is in its original form (if its not, consider using sfc.exe to check files).  Also, a virus scan would be standard practice if anything is not working as it normally should (considering that you observed it actually launch notepad).
0
 

Author Comment

by:it_
ID: 24398056

Thanks Epohchasset.

It somehow seems to be only happening with "all" Win 2003 machines all other machines are fine. Using 1.95.
0
 
LVL 5

Expert Comment

by:epochasset
ID: 24399018
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"

0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

Author Comment

by:it_
ID: 24399369

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
0
 
LVL 5

Expert Comment

by:epochasset
ID: 24400857
By chance are the 2003 machines attached to an active directory domain?
0
 

Author Comment

by:it_
ID: 24412013

Thanks for your continuing help.

Yes the 2003 machines are connected to active directory domain..
0
 

Author Closing Comment

by:it_
ID: 31581993
found another solution
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have been pestered over the years to produce and distribute regular data extracts, and often the request have explicitly requested the data be emailed as an Excel attachement; specifically Excel, as it appears: CSV files confuse (no Red or Green h…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Six Sigma Control Plans

877 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question