Help! Bat file problem

SET SOURCE_PATH=\server\Folder1\Destination

taskkill /S PC1 /U Workplace\Destination /P password /IM powerpnt.exe
taskkill /S PC2 /U Workplace\Destination /P password /IM powerpnt.exe
taskkill /S PC3 /U Workplace\Destination /P password /IM powerpnt.exe

timeout /T 3

xcopy “%SOURCE_PATH%\AutoStart.ppsm” “\PC1%DEST_FOLDER%” %FOLDER%
xcopy “%SOURCE_PATH%\AutoStart.ppsm” “\PC2%DEST_FOLDER%” %FOLDER%
xcopy “%SOURCE_PATH%\AutoStart.ppsm” “\PC3%DEST_FOLDER%” %FOLDER%

This script works fine which allows the closure of Powerpoint on the remote computers and the updating of the file.

But when i try to run this script to reopen those files on the PCs it opens it but not interactively so you do not see the powerpoint even though it shows in the taskmanager. So i have to remote into it and reopen the powerpoint manually for it to work.

the script i use to try and reopen the powerpointfile is

rem #psexec \PC1 -u Workplace\Destination -p password -i -d “%PROGRAMFILES%\Microsoft Office\Office14\powerpnt.exe” /s “d:\Filename\autostart.ppsm”

It works if i run it locally but when i try to run it remotely that is where i get the issues.

not sure where i have gone wrong any help would be great :slight_smile:

I see absolutely no troubleshooting on your part. You should be narrowing it down to the most simple code that demonstrates the problem e.g. if you can’t even get the DIR command to execute remotely then scrap the rest, there’s your question.


What do you mean by


+stick he makes it clear. See the command he used psexec

Hello Sorry for the long reply, family issues all kicked off last week.
when you say run the DIR check i shouldnt need to if the script is already updating the file on the local pc and actually reopening the .ppt?

It is just for some reason not showing the actual ppt I have tried a couple of WMIC scripts to see if that would work such as:-
wmic /node:pc1 /user:“Domain~User” /password:“password” process call create "C:\Users\Documents\Filefolder\test.bat"

I wanted to see if i could run a command to run a script on a remote pc but unfortunately this also didnt work.

to be completely honest I’ve only literally dipped my toes into this sort of thing so some advice even if it is a direction of certain commands will certainly help.

can you even tun a command remotely saying echo asdfasdf ?

I have figured out the problem, I have just created a quick test script:-
psexec \PCNAME -s C:\Users\USER1\Documents\pptautorun.bat

when I went into the task manager ppt doesn’t show in the processes until you show all users, I now need some way of specifying the user to open the ppt on?

if that is possible

Currently trying it as

PSEXEC \PCNAME -u Domain\User -p p/word C:\Users\User1\Documents\pptautorun.bat

psexec \PCNAME -i C:\Users\User1\Documents\pptautorun.bat

worked, but for what ever reason PPT is coming up as a black screen?

Resolved the black screen issue i now run it as
psexec \PCNAME -s -i C:\Users\User1\Documents\pptautorun.bat

no idea why this has worked but it does, but now it comes up with a pop up saying that Powerpoint cannot read the file, but when i tested the .BAT file that i have on the local machine it opens up the .ppsm with no issues.

and now im stuck again