There are times when I have my laptop disconnected from the network and I want to do some serious graphics work. Because graphics software is very CPU intensive, I want my graphics program to have as little CPU competition as possible. This is especially true when I am working on very large images in Photoshop or running a render using one of my 3D applications, be it Lightwave, Mojoworld, or Bryce.
Now I could use the Windows Task Manager to go in and one by one shut down processes that I know aren’t needed. Or I could use the Windows XP System Services tool services.msc to accomplish the same thing.
There are a few problems with this approach. First I need to remember what processes to shut down each time. Being disconnected from the network allows me to shut down quite a few additional processes like antivirus, firewall, and other internet-related processes. On a typical Windows PC, this can be a rather lengthy list. And once I know what I want to shut down, I have to find each process in the list of processes and manually shut them down one by one. What a pain.
My solution was to automate the process. I had previously created a directory on my laptop called a_Utils which contained a variety of DOS batch programs I had written. One thing I did when I created this directory was to make sure that it was in the Windows Path environment variable – a variable that tells Windows where to look for programs. This variable can be set on Windows XP as follows:
- Right click the My Computer icon and select Properties
- Click on the tab labeled Advanced
- Click on the Environment Variables button
- In the System variables window, locate the variable Path and select it by clicking it once.
- With Path selected, click on the Edit button at the bottom of the window.
- In the Variable value field, go to the end of the field, add a semicolon if one is not already there and type in the full path to the directory that contains your batch file.
- Click the trail of OK buttons back to the System Properties window
- Click the OK button
In my directory a_Utils I created a DOS batch program file named !KillTasks.bat. This file consists of a list of taskkill commands. Taskkill is a Windows command line program that is used to terminate one or more tasks or processes which are identified by either their process ID or image name. I use the command in the following form:
taskkill /f /im ImageName
The parameters I specify are:
- /f which tells Windows to “forcefully” terminate the process. In other words, don’t take no for an answer.
- /im tells Taskkill that I am specifying the image name of the process to be terminated.
- ImageName gives Taskkill the name of the process to terminate.
So far this has all been rather straight forward. Now the trick is in identifying what tasks or processes you can safely terminate. My method of doing this was to open Windows Task Manager and go to the Processes tab. Looking over the list of processes, the function of several was obvious and I knew whether or not it was a process that must run or a process I could kill. For others, I plugged the Image Name into a Google search in order to determine what the process does and whether or not I could kill it.
Following is an extract of what my !KillTasks.bat looks like. In this extract I am only including the commands for terminating my Nikon camera monitor and Copernic desktop search tool. The actual list is much longer.
I close my program with the PAUSE command. This prevents the DOS window from closing until I press the Enter key, giving me the opportunity to look over the command output. This is just a personal preference on my part.
Now whenever I want to disconnect from the network and do some serious graphics work all I have to do is run my batch program. To make it really easy I created a shortcut to the program on my desktop. One double-click and my laptop is ready for some heavy duty graphics work.
Ad Astra, Jim