Windows IT Pro is the leading independent community for IT professionals deploying Microsoft Windows server and client applications and technologies.
  
  
  Advanced Search 


May 08, 2006

Utility Monitors Crucial Processes

RSS
Subscribe to Windows IT Pro | See More Tips Articles Here | Reprints | Or get the Monthly Online Pass—only $5.95 a month!

Download the Code Here

The checkres subroutine also uses a function named userinfo. This function uses Windows Script Host's (WSH's) WScript.Network object to retrieve the username and computer name. This object lets you easily access shared resources on Windows networks.

If you have Microsoft Word installed on your local computer, you can test the utility by following these steps:

  1. In the sample process.txt file, delete all the entries except WINWORD.EXE.
  2. Make sure Word isn't running on your computer.
  3. Run CheckProcess .hta. In the utility's UI, WINWORD.EXE's Status column should read DOWN.
  4. Start Word.
  5. Run CheckProcess.hta. WINWORD.EXE's Status column should now read UP.

You can customize this utility so that it performs a specific action when a process goes down. For example, when a process goes down, you can add code that displays an alert box, sends an email, or restarts the process. Listing 2 shows where you can add such code.

The CheckProcess utility works on Windows XP, Windows 2000, and Win2K Professional machines that have WSH 5.6 installed. To verify the WSH version on your machine, run the command

cscript //Logo 

from the command line. The first line in the output will show the WSH version.

End of Article

   Previous  1  [2]  Next  


Reader Comments

You must be a registered user or online subscriber to comment on this article. Please log on before posting a comment. Are you a new visitor? Register now




Top Viewed ArticlesView all articles
Command Prompt Tricks

One reader shares his tip for setting up the command prompt to reflect a remote path. ...

WinInfo Short Takes: Week of November 23, 2009

An often irreverent look at some of the week's other news, including some post-PDC some soul searching, a Google Chrome OS announcement and a Microsoft response, Windows 7 off to a supposedly strong start, the Jonas Brothers and Xbox 360, and so much more ...

2009 Windows IT Pro Editors' Best and Community Choice Awards

Picking a favorite product from an impressive crowd of competitive offerings is never an easy task, and such was the case with our Editors' Best and Community Choice awards this year. ...


Scripting Whitepapers From Development to Production: Streamlining SharePoint Deployment with DocAve Deployment Manager

Related Events Managing IT Across Multiple Locations

7 Ways To Get More From Your SharePoint Deployment Now

Concrete Ways to Make Sure Your SharePoint Deployment Doesn't Blow Up

Check out our list of Free Email Newsletters!

Scripting eBooks Keeping Your Business Safe from Attack: Encryption and Certificate Services

Best Practices for Managing Linux and UNIX Servers

Building an Effective Reporting System

Related Scripting Resources Introducing Left-Brain.com, the online IT bookstore
Looking for books, CDs, toolkits, eBooks? Prime your mind at Left-Brain.com

Discover Windows IT Pro eLearning Series!
Clear & detailed technical information and helpful how-to's, all in our trademark no-nonsense format


Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro DevProConnections IT Job Hound
Left-Brain.com Technology Resource Directory asp.netPRO ITTV Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 © 2009 Penton Media, Inc. Terms of Use | Privacy Statement