Working with System Processes in WSH
(Page 1 of 4 )
In this article, we’re going to explore the different ways of working with system processes in WSH. Behind every running program in Windows is a process. Those processes control every end-user function that the computer performs.
Understanding and controlling these processes allows you to do some pretty advanced scripting. Pretty advanced scripting, in turn, requires pretty advanced techniques and for that we turn to WMI.
The Windows Management Interface provides scriptable access to core system components and hardware. It exposes dozens of properties and methods with classes that span nearly every corner of the operating system.
So why might someone want a script to have the ability to control processes?
Well, to be quite simple, if you control the processes, you control the entire operating system. As you can imagine, this can be both extremely useful and potentially dangerous.
On the surface, processes are just programs. Notepad, Calculator, and Microsoft Word are applications that rely on underlying processes. You anti-virus program relies on an underlying process in order to monitor your system's health.
Some processes are more sophisticated and less visible, controlling such things as the Windows desktop, network connectivity, and Windows Update. In fact, many processes run hidden, meaning that they don't display a user interface and they don't appear in the task bar.
The most common scripting tasks are to monitor what tasks are running or to start and stop them. We'll go into detail on each of these as well as other functions such as raising or lowering a processes' priority level.
Next: Taking a look under the hood >>
More Windows Scripting Articles
More By Nilpo