Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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).

share|improve this question
add comment

3 Answers

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.

share|improve this answer
    
sure thought about it but figured this might be more of a server techie kinda thing :) –  Scott Bennett-McLeish Aug 27 '09 at 12:18
    
As this crosses the boundaries a bit why not post to both? –  John Gardeniers Aug 27 '09 at 13:28
add comment

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.

share|improve this answer
    
shudder on the VB, unless we're talking about beer ... its Groovy for me :) –  Scott Bennett-McLeish Aug 27 '09 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 '09 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. –  John Gardeniers Aug 27 '09 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 '09 at 14:44
add comment

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

TaskKill /f /im powerpnt.exe
share|improve this answer
    
Props to serverfault.com/questions/3780/… for this answer. –  Scott Bennett-McLeish Aug 27 '09 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 '09 at 13:15
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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