

Prerequisites for Your Win32_Process Script The second example adds a terminate process command. Each script begins with GetObject winmgmts and ExecQuery commands. The key part of both scripts is where they connect to the CIM class called Win32_Process. Then, if necessary, we could append code to the script and thus terminate one of those processes. Whilst our goal is to control programs on another machine by using a VBscript, let us begin with a script which simply lists the processes. Example 1 – List the Processes Running on the Computer In this instance, we could click on the Processes tab to view all the running programs. Incidentally, the screen shot on the right reminds us that VBScript automates steps that you could walk through manually. An example of this link is Applications shows Microsoft FrontPage and the corresponding process is frontpg.exe One way to investigate the names would be to Launch Task Manager, select the Application tab, right-click the program and then choose, Go to Process. Scenario – Why you would want to List a Process?īefore creating a script, which will stop the process, you need to research the precise name of the corresponding program. Starting a Service (as opposed to a process) – See this page.


This page is the foundation for a trilogy of Process pages.
