We have a Windows 7 box constantly looping a PowerPoint Slide (with macros) onto two 48" televisions via an hdmi splitter/cat6 converter. We have mapped a shared drive (T) and created a folder called New in that shared drive. Our clients are constantly wanting to update the slides, so we have asked them to save the version they want as T:/New/screens.ppsm. We have created the following script to look for an updated version, kill powerpoint and relaunch. The problem we are having is the script kills the slide and then opens the full version of powerpoint, rather than just the slide. Here is the script:
sSourcefile = "T:\NEW\screens.ppsm"
sTargetFile = "T:\screens.ppsm"
sPPTViewer = "C:\Program Files\Microsoft Office 15\root\Office15\POWERPNT.EXE"
DQ = """"
Set oFSO = CreateObject("Scripting.FileSystemObject")
If oFSO.GetFile(sSourceFile).DateLastModified = _
oFSO.GetFile(sTargetFile).DateLastModified Then WScript.Quit
Set oWshShell = CreateObject("WScript.Shell")
oWshShell.Run "taskkill.exe /f /im powerpnt.exe", 0, True
oFSO.CopyFile sSourceFile, sTargetfile, True
oWshShell.Run DQ & sPPTViewer & DQ & " /F T:\screens.ppsm", 0, False
We have also created a Scheduled Task to run every minute, to start wscript.exe, with the start-in option of C:/Scripts. That is where the screens.vbs file lives. The task is running, but it is not prompting the script to run. Any ideas?
Thanks in advance,