I'd like to write a little app to loop through a directory of powerpoint presentations. I figure a likely solution would perhaps require simply running powerpoint for say 30 mins and then killing it before running powerpoint again with another presentation.

The idea is that it would be unmanaged and other people could simply drop a new powerpoint file in the directory and it would eventually be displayed. My target deployment is to an LCD TV in a hallway at the office so the PC is unmanned.

Starting powerpoint via an application is easy, the sticking point at the moment is how to kill a running powerpoint (started from the same app).

3 Answers 3


Well well, I've found one solution for the command line (easy for most programming languages):

TaskKill /f /im powerpnt.exe
  • 1
    Props to serverfault.com/questions/3780/… for this answer. Aug 27, 2009 at 12:23
  • I use this all the time. I've had various software that are not supported in Vista but they work fine, they just hang every once in a while and making a shortcut to a bat with that in it kills it instantly and I can have my batch restart the app.
    – Hondalex
    Aug 27, 2009 at 13:15

As far as I know, all MS Office apps can be remote-controlled using Visual Basic or some other language. That might be a more flexible and cleaner approach than the "start and kill" you are trying.

See for example this article: Automate Office PowerPoint 2007 with Visual Basic 2005.

OpenOffice.org can similarly be remote-controlled. See e.g. the OpenOffice.org BASIC Programming Guide.

Of course, if you really want to kill PowerPoint.exe, just use the Windows API. There's a call to kill a process. Here's the docs for .net: http://msdn.microsoft.com/en-us/library/system.diagnostics.process.kill.aspx

There is certainly a similar function to invoke from C/C++ in the Windows API.

  • shudder on the VB, unless we're talking about beer ... its Groovy for me :) Aug 27, 2009 at 12:19
  • I agree, but as they say, if you say A (MS Office), you must say B (VB for automating it). But I understand you can also use any .net language nowadays...
    – sleske
    Aug 27, 2009 at 12:31
  • Why use VB just because it's an Office app? You could just as easily use any other language. There is absolutely no need to use VB. I personally favour Perl for automating MS Office apps. Aug 27, 2009 at 13:36
  • Ah, I see. I've never automated MS Office, so I don't know which languages can be used. If there are bindings for Perl, all the better.
    – sleske
    Aug 27, 2009 at 14:44

This is certainly easily enough done programmatically, including the random selection of the next presentation. Try asking the question over at Stack Overflow, which is dedicated to programming.

  • sure thought about it but figured this might be more of a server techie kinda thing :) Aug 27, 2009 at 12:18
  • As this crosses the boundaries a bit why not post to both? Aug 27, 2009 at 13:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.