Computing.Net > Forums > Windows NT > Psexec and Batch Files

Psexec and Batch Files

Reply to Message Icon

Original Message
Name: Trish
Date: October 18, 2003 at 11:39:57 Pacific
Subject: Psexec and Batch Files
OS: NT4
CPU/Ram: 200MHz 32MB
Comment:

I have 2 computers. Computer 1 (running NT4) has PPViewer, a PowerPoint show, and BatchFile1. Computer 2 (running W2K) has BatchFile2.

BatchFile2 runs Pskill to stop the ppview32 process on Computer 1, then Psexec to start BatchFile1 on Computer 1. BatchFile1 deletes the current show from the hard drive, maps a network drive, copies new show, disconnects network drive, and starts new show.

If I sit at Computer 1 (local admin rights) and run BatchFile1, it works great. If I sit at Computer 2 (domain admin rights) & run BatchFile2, it terminates the process successfully but says that the remote batch file exited with error code 0. Looking at Computer 1, the PP show is no longer visibly running, the file was not updated, but ppview32 is running (according to Task Manager).

Any suggestions? (I've tried using psexec "-c" switch... didn't work.) File codes listed below. Thanks!

Trish

BatchFile2:
@ECHO OFF
pskill \\Computer1 -u localadmin -p password PPVIEW32.EXE
psexec \\Computer1 -u localadmin -p password c:\BatchFile1.bat

BatchFile1:
@ECHO OFF
NET USE P: \\server\dir /user:domainadmin password
DEL C:\MONITOR.PPS
COPY P:\MONITOR.PPS C:\*.*
NET USE P: /DELETE
START C:\MONITOR.PPS


Report Offensive Message For Removal


Response Number 1
Name: Trish
Date: October 19, 2003 at 14:37:13 Pacific
Reply: (edit)

Got an answer to my own question... in case it helps anyone in the future.

I adjusted BatchFile1 to simply read:
@ECHO OFF
start c:\monitor.pps

BatchFile2 was changed to read:
@ECHO OFF
pskill \\Computer1 -u localadmin -p password PPVIEW32.EXE
NET USE Z: \\remotecomputer\c$ /user:localadmin password
DEL Z:\MONITOR.PPS
COPY P:\MONITOR.PPS Z:\*.*
NET USE Z: /DELETE
psexec \\Computer1 -u localadmin -p password -i c:\monitor.pps


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 and Batch Files

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software




Have you ever used OpenOffice?

Yes, as my main suite.
Yes, occationally.
Yes, but only once.
No, never.


View Results

Poll Finishes In 6 Days.
Discuss in The Lounge