Identify and Terminate Office Appb 
Author Message
 Identify and Terminate Office Appb

I don't know if the PowerPoint viewer expose an object model of any kind (would
be nice) , but the short answer is probably just "WMI".

What version of Windows is on the system? If it is running WIn9x or NT4 you
would need to first install WMI to make it possible to do this.


Quote:
> I'm familiar with launching & controlling an MS Office app (Excel, Word,
> PPT), but what I need to know is how to identify if a given App is running,
> then terminate it.

> My problem ... I have a Powerpoint (PPT) presentation that runs 24/7 for a
> large screen display.  Some of the PPT involves linked XLS data that gets
> updated daily.  I want to run a script daily (using Task Scheduler in W2K)
> to close the PPT, then re-open, refresh links, save file, then re-start
> presentation.  I'm using Powerpoint Viewer app to run the show.

> Thanks for any help!



Sun, 26 Sep 2004 10:23:47 GMT  
 Identify and Terminate Office Appb

Quote:

> I'm familiar with launching & controlling an MS Office app (Excel,
> Word, PPT), but what I need to know is how to identify if a given App
> is running, then terminate it.

Assuming WMI available...

set wmi = getobject("winmgmts:")
wql = "select * from win32_process " _
    & " where name='notepad.exe'"
set results = wmi.execquery(wql)
for each process in results
  process.terminate
next

This is essentially the same as using the TaskManager GUI to "End Task".  The app is killed very unceremoniously with no opportunity to save, clean up, etc...

--
Michael Harris
Microsoft.MVP.Scripting
Seattle WA US
--



Sun, 26 Sep 2004 11:02:10 GMT  
 Identify and Terminate Office Appb
Not an issue in this particular case since it is the PowerPoint Viewer (I know,
you still want to make sure it's _known_).



Quote:
>This is essentially the same as using the TaskManager GUI to "End Task".
>  The app is killed very unceremoniously with no opportunity to save, clean up,

etc...


Sun, 26 Sep 2004 12:50:53 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. How to identify a record

2. Identifying text and images within a .ps file

3. Identifying Colour and Grey in PostScript files

4. identify and remove unused definitions

5. identifying images in postscript printer files

6. Identify user - Canon CLBP460 (re-post)

7. Identify user - Canon CLBP460 (re-post)

8. Identify the name of computer

9. Identifying previous URL

10. Identify whether a frame exists from a pop up window

11. How to identify a record

12. Regular Expression Problem Identifying Quotes...

 

 
Powered by phpBB® Forum Software