Solved

Script to run new version of PowerPoint Slide

Posted on 2014-11-11
3
347 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Companies keep a much closer eye on costs today, so changing to new Technology – Microsoft Office 365 is the smartest move to take.
In threads here at EE, each comment has a unique Identifier (ID). It is easy to get the full path for an ID via the right-click context menu. However, we often want to post a short link within a thread rather than the full link. This article shows a…
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

749 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