Solved

Script to run new version of PowerPoint Slide

Posted on 2014-11-11
3
326 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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

A high-level exploration of how our ever-increasing access to information has changed the way we do our jobs.
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.
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…

728 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now