Solved

Script to run new version of PowerPoint Slide

Posted on 2014-11-11
3
342 Views
Last Modified: 2014-11-13
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,
John
BCC
0
Comment
Question by:John Lijoi
3 Comments
 
LVL 65

Accepted Solution

by:
RobSampson earned 500 total points
ID: 40439096
Hi, the PPTViewer file you are executing is the full Powerpoint product.  You will want to grab the PPTView.exe from a folder where you have published a presentation.

That way, it should "play" the presentation instead of opening it.

The scheduled task should work fine.  You won't be prompted to run the script when you use that, although you will want to check the "run with highest privileges" box to make sure it can kill the task.

Rob.
0
 
LVL 23

Expert Comment

by:JSRWilson
ID: 40439976
You are opening PowerPoint and then opening the ppsm file. If you do this manually you will see it does not open in show mode.

If you add a /s switch in the command line it should (I haven't tested)

Since it's a ppsm file I guess there are macros. The viewer will NOT run macros.
0
 

Author Comment

by:John Lijoi
ID: 40441829
Thank you both.  I was able to get the script to open the slides by changing from powerpnt.exe to pptview.exe.  I was able to get the task to run by changing the User to BuiltIn/Administrator, checking "Run with the highest priviliges" and by adding arguments to keep the logo from popping up and pointing to the folder the script lives in.

The fact that PowerPoint Viewer doesn't support add-ins has forced me to have users remotely restart the machine running the slides after saving a new version.  The remote computer has Read Only privileges, so the networked file can be modified while its running.  We have pasted a shortcut to the .ppsm file in the Startup folder and we have enabled AutoAdminLogin.  The computer restarts, signs itself in and starts the slides.
0

Featured Post

Connect further...control easier

With the ATEN CE624, you can now enjoy a high-quality visual experience powered by HDBaseT technology and the convenience of a single Cat6 cable to transmit uncompressed video with zero latency and multi-streaming for dual-view applications where remote access is required.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
This article will shed light on the latest trends when it comes to your resume building needs. For far too long, the traditional CV format has monopolized the recruitment market.
The viewer will learn how to dynamically set the form action using jQuery.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question