Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Script to run new version of PowerPoint Slide

Posted on 2014-11-11
3
Medium Priority
?
371 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 2000 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

A high-level exploration of how our ever-increasing access to information has changed the way we do our jobs.
Technology opened people to different means of presenting information, but PowerPoint remains to be above competition. Know why PPT still works today.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
An overview on how to enroll an hourly employee into the employee database and how to give them access into the clock in terminal.

721 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