Streamlining your PC to play games

Overview

Before I run a resource intensive game, I execute a little batch file that kills a bunch of background processes that are simply not needed when playing the game. I’ll explain the details below, but don’t forget to click here today to find out about one of my favorite gambling games.

I have also noticed that before I used to do this, I experienced awful crashing problems with my PC just locking when playing. Since killing these extraneous processes, however, I have not had a single in-game crash that I used to get regularly with both BF2 and BFV. I think this shows that something in my system is having a bad interaction with the game – probably the graphics driver. I used to think it was an interaction with Panda antivirus, but recently I modified the script to not kill Panda and things still run OK. This makes me a little happier that I can keep my AV program running at all times.

After I finish playing, I simply reboot my PC to restore normality. I could, alternatively, have written a simple script that restarted all the services, but to be honest it is just as quick to reboot. It also prevents worrying about start up order for dependent services.

Before I start, it’s just worth explaining that a “service” in WindowsXP-speak is just a program that Windows starts up automatically to do something useful. For example, Bluetooth connectivity is simply a service, as is the ability to log in multiple users at once.

When do you need this? Well, if you run Task Manager and click on the Processes tab, if you have more than 35 or so processes running when all your normal programs have exited, then I would seriously consider streamlining your PC before running a game like BF2. This improves performance – perhaps not absolute frame rate, but will almost certainly remove the cause of most periodic judders and temporary freezes. It also reduces the chance of extra disk paging as the load on the memory system is reduced. If you suffer from jerks or freezes, consider this.

Instructions

The script I’ll post below safely shuts down a number of services that you just don’t need when fragging the enemy. Your system may vary slightly – chances are you may not have the exact same set of services running that I do. I’ll provide some hints on finding what to kill at the end. I am hoping that readers of this post will reply with other services that can be safely terminated too.

Steps 1-4 are just one off setup steps. Every time you play a game, just start at step 5.

    1. Firstly you need to create a “batch” file – I call mine “minimal.bat”. Put it somewhere on your disk you can find it again – e.g. My Documents/games. You can do this with Notepad, but you may need to manually force the extension in Windows File Manager to “.bat”, as default XP installations will make Notepad append a “.txt” extension, and it won’t work.
    2. Create a shortcut to the file, and put that on your desktop. Alternatively, just save the original file to your desktop.
    3. Paste the following text into that file:

      REM Kills all non-essential services
      net stop "Automatic Updates"
      net stop "Background Intelligent Transfer Service"
      net stop "Bluetooth Service"
      net stop "COM+ Event System"
      net stop "Computer Browser"
      net stop "Distributed Link Tracking Client"
      net stop "Help and Support"
      net stop "Secondary Logon"
      net stop "Themes"
      net stop "Windows Image Acquisition (WIA)"
    4. Bring up Task Manager and show the processes tab. Note the process count.
    5. Exit all your non-essential programs. E.g. for me, I exit Skype, Internet Explorer, Messenger, Outlook etc
    6. Just prior to playing a game, double click the icon for the minimal.bat file – or its shortcut, depending on what you did in (1). A command window will come up, and various bits of text will scroll past. You may find that you get asked to confirm certain process shutdowns – just hit Yes each time.
    7. When it finishes, note that your process count will have reduced.
    8. An optional extra step here is to manually shut down processes that were started by Windows, but which are not services – only services can be halted by the “net stop” command. In which case, right click and hit “End Process”. Examples of these on my system are:
      • fpdisp4.exe: which is the excellent FinePrint utility
      • msnmsgr.exe: Windows Messenger.
      • BTSTAC.exe: Bluetooth stack – safe to kill, unless you have Bluetooth devices you need to work while playing the game. E.g. Bluetooth wireless mouse.

      Be very careful about what you kill off. If in doubt, Google for the process name.

    9. Run your game


This probably sounds harder than it really is – once you have the batch file set up, it really is a piece of duff to do.
Ideally step 8 could be added to the batch file too. But WindowsXP does not have a command line tool to kill named processes directly. You can download things like Pskill from www.sysinternals.com, but I find my AV program kills those dead, as they often form part of virus payloads.

Automating the manual bit – step 8

You can automate step 8 above if you download “kill.exe” and put it in the same location you store your batch file – or anywhere else on your search path. If you don’t know what a search path is, then stick it where the batch file was saved.
Add the following lines to your batch file. The process names may vary, but to show you how it would work for my example in step 8, add:

kill -f fpdisp4.exe
kill -f msnmsgr.exe
kill -f pdfsaver3.exe
kill -f WCESCOMM.EXE
kill -f BTSTAC.exe

You can just Google for kill.exe. I downloaded it from here:
http://www.mattkruse.com/utilities/

How the hell do I know what services to kill?

A fine question. From Control Panel->Administrative Tools, select “Services”. Sort by “Status”, and you’ll see all services that are running. If you see one that from its name and description looks like it is surplus to gaming requirements, take a note of its name and add it to the batch file, preceded by the words “net stop”. A quick Google search should help work out what a given filename does.

If you want to know what processes you may be able to kill that are not services, look at the processes tab in Task Manager.

Summary

This post has ended up being way longer than I originally planned, but I hope I have added enough explanation to help people get the best out of their PC’s when playing games. As I mentioned above, this process has improved my gaming experience enormously.

Let me just state that this is completely safe – the next time your PC reboots normality will be restored. If you end up trying to stop a service and it kills your PC, again just a reboot will fix everything. All changes that this script executes are temporary.

2 thoughts on “Streamlining your PC to play games

  1. Pingback: Blog makeover

Leave a Reply