Advertisement

06.23.2007 at 08:33AM PDT, ID: 22653238
[x]
Attachment Details

using psexec to run remote DOS commands

Asked by Benjamin297 in Windows Batch Scripting, MS DOS, VB Script

Tags: psexec, remote, dos, run, command

I am trying to use psexec to run remote DOS commands on a server. Unfortunately I am not permitted to copy the files I am running to the remote machine for security reasons. Therefore I have used the following command...

psexec cmd

This brings up a DOS window and if I type echo %COMPUTERNAME% then the remote machine name is correctly returned. This is fine, but when I type a batch file with the following...

psexec cmd
psexec echo %COMPUTERNAME%

Then the remote machine name is not returned, infact nothing is returned... Due to the fact I cannot remotely move files to the actual server I want to work on then Im assuming performing commands in this way is the only option available. However I cannot seem to execute multiple DOS commands. It is also necessary that I can read the output of the commands I use so that I can perform conditional processing.

If it helps I am able to use VBS scripts to perform these tasks if that provides the correct functionality... Ideally though a pure DOS solution would be great.

Thanks in advance...Start Free Trial
[+][-]06.23.2007 at 08:48AM PDT, ID: 19348133

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.23.2007 at 08:53AM PDT, ID: 19348160

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.23.2007 at 09:01AM PDT, ID: 19348218

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.23.2007 at 09:09AM PDT, ID: 19348274

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.23.2007 at 04:27PM PDT, ID: 19349362

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.23.2007 at 05:14PM PDT, ID: 19349450

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.23.2007 at 06:17PM PDT, ID: 19349559

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.23.2007 at 09:55PM PDT, ID: 19349989

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.24.2007 at 02:39AM PDT, ID: 19350394

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.24.2007 at 03:37AM PDT, ID: 19350530

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Windows Batch Scripting, MS DOS, VB Script
Tags: psexec, remote, dos, run, command
Sign Up Now!
Solution Provided By: RobSampson
Participating Experts: 4
Solution Grade: A
 
 
[+][-]06.24.2007 at 04:20AM PDT, ID: 19350646

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32