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

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Psexec and Batch Files

Reply to Message Icon

Name: Trish
Date: October 18, 2003 at 11:39:57 Pacific
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



Sponsored Link
Ads by Google

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

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


0
Reply to Message Icon

Related Posts

See More


restoring c:\winnt\loader... getting rid of windows nt...



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Windows NT Forum Home


Sponsored links

Ads by Google


Results for: Psexec and Batch Files

RE: using a batch file with pullmail www.computing.net/answers/windows-nt/re-using-a-batch-file-with-pullmail/7351.html

using a batch file with pullmail www.computing.net/answers/windows-nt/using-a-batch-file-with-pullmail/7350.html

AT and local batch files? www.computing.net/answers/windows-nt/at-and-local-batch-files/16260.html