Specialty Forums
Security and Virus
General Hardware
CPUs/Overclocking
Networking
Digital Photo/Video
Office Software
PC Gaming
Console Gaming
Programming
Database
Web Development
Digital Home

General Forums
Windows XP
Windows Vista
Windows 95/98
Windows Me
Windows NT
Windows 2000
Win Server 2008
Win Server 2003
Windows 3.1
Linux
PDAs
BeOS
Novell Netware
OpenVMS
Solaris
Disk Op. System
Unix
Mac
OS/2

Drivers
Driver Scan
Driver Forum

Software
Automatic Updates

BIOS Updates

My Computing.Net

Solution Center

Free IT eBook

Howtos

Site Search

Message Find

RSS Feeds

Install Guides

Data Recovery

About

Home
Reply to Message Icon Go to Main Page Icon

PsExec issue in batch file

Original Message
Name: keridbey
Date: January 31, 2008 at 12:16:38 Pacific
Subject: PsExec issue in batch file
OS: WinXP
CPU/Ram: 1.83 Ghz / 1 Gb
Model/Manufacturer: Dell
Comment:
I am running PsExec from a batch file to run another batch file on a remote system. Here's the basic line:

C:\Tools\psexec \\xxx.xxx.xxx.xxx -u administrator -p password -i C:\ProgToBeRunRemotely.cmd

Here's what PsExec responds with:

PsExec v1.94 - Execute processes remotely
Copyright (C) 2001-2008 Mark Russinovich
Sysinternals - www.sysinternals.com

P requires Windows NT/2000/XP/2003.

I'm running the batch file on my Windows XP system, and the remote batch file is on a Windows 2000 system. I've run the exact line from the batch file outside of the batch file, and it works, so I know it's not a problem with PsExec, but I'm at a loss as to what in my batch file could be interfering with it. Has anyone ever seen PsExec respond in this manner?


Report Offensive Message For Removal


Response Number 1
Name: keridbey
Date: January 31, 2008 at 12:47:05 Pacific
Subject: PsExec issue in batch file
Reply: (edit)
Update:

It seems to result from how I'm calling PsExec. I'm running my batchfile from a directory other than C:\Tools; apparently PsExec doesn't care for that. I was hoping to not have to copy PsExec to the %windir% directory; if anyone has any ideas on how to get around this, it'd make me quite happy!


Report Offensive Follow Up For Removal

Response Number 2
Name: Razor2.3
Date: January 31, 2008 at 15:44:01 Pacific
Subject: PsExec issue in batch file
Reply: (edit)
Add this to the start of your command script?
cd c:\tools


Report Offensive Follow Up For Removal

Response Number 3
Name: keridbey
Date: January 31, 2008 at 16:02:02 Pacific
Subject: PsExec issue in batch file
Reply: (edit)
I tried adding that right before the psexec command, but it still didn't like it (gave the same response). I think that since it does work when PsExec is in %windir% I will end up going that route. <sigh> Still, it's a learning experience. :)

Thanks!


Report Offensive Follow Up For Removal

Response Number 4
Name: klint
Date: February 1, 2008 at 01:48:08 Pacific
Subject: PsExec issue in batch file
Reply: (edit)
This is puzzling me. Does it work if you add C:\Tools to your PATH environment variable? Add it to System Variables using Control Panel -> System Properties dialog -> Advanced tab -> Environment Variables button.

Remember to remove psexec.exe from %windir% to test if it works from C:\Tools when it's in the PATH.


Report Offensive Follow Up For Removal

Response Number 5
Name: keridbey
Date: February 5, 2008 at 08:28:44 Pacific
Subject: PsExec issue in batch file
Reply: (edit)
Unfortunately, the wheels of progress necessitated changes to the script right away, and it's been adapted for the %windir% approach. I've been trying to see if I could duplicate the message PsExec was giving me, but so far I haven't been able to (even after writing a little mini-script that was as close to the original as I could get); apparently I've officially left the Twilight Zone. :)

Thanks for your help!


Report Offensive Follow Up For Removal




Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: PsExec issue in batch file

Comments:

 
  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 


Data Recovery Software




Slow boot time

Trasnferring Documents from old HD

My k8T Neo-v usb's aren't working!

Date Modified = Date Created Time

system files on removable harddrive


The information on Computing.Net is the opinions of its users. Such opinions may not be accurate and they are to be used at your own risk. Computing.Net cannot verify the validity of the statements made on this site. Computing.Net and Computing.Net, LLC hereby disclaim all responsibility and liability for the content of Computing.Net and its accuracy.
PLEASE READ THE FULL DISCLAIMER AND LEGAL TERMS BY CLICKING HERE

All content ©1996-2007 Computing.Net, LLC