ghacks Technology News

Run Punkbuster Services Only When Needed

If you have recently installed a game that uses the anti-cheating software Punkbuster to reduce online cheating in the game you may have noticed the two Punkbuster services PnkBstrA.exe and PnkBstrB.exe running in the Windows Task Manager even if the game has not been started in the session.

Punkbuster gets installed as two Windows Services that automatically run when Windows starts. They will run even if the games they protect are not started once on the computer system. The two programs do not use a lot of system resources when the game is not running but are an annoyance as it does not make sense to some users to run them when they are not needed.

Changing the service’s startup type from automatic to manual will prevent that they are loaded during system startup. One could say problem solved but that’s not really the case as the two services will not be started during game start. This would mean that the user would have to manually start the services before launching the game, not a comfortable solution.

The following guide explains how to set the Punkbuster services to manual so that they are not loaded during system startup. It will furthermore explain how to configure the games to automatically load the Punkbuster services before the games are started so that the services are running when the game is played.

Disabling Punkbuster services from being automatically loaded in Windows:

Open the Services Configuration menu in Windows. You can do that by entering services in the Windows start menu and selecting Services from the results or by pressing Win-R, typing services.msc and hitting the enter key.

Locate the two services PnkBstrA and PnkBstrB in the window. Double-click the first Punkbuster Service Component and change the Startup Type from Automatic to Manual. When done click on the Stop button to stop the service from running on the PC. Do the same for the second Punkbuster service.

punkbuster service

Both Punkbuster services have now been stopped and set to manual startup type. You can verify that the services are not running anymore in the Windows Task Manager (Win-Shift-Esc).

Creating a batch file to start the services when needed and launch the game

The Punkbuster services need to be running before the game is started so that the user will not be kicked from servers requiring Punkbuster on the user machine. A batch file is ideal for this situation. We will create a basic batch file that will start both Punkbuster services and the game. (Please note that you will need to run the batch script with administrative privileges for the services to start).

Create a new text document. Paste the following three lines into it:

NET START "PnkBstrA"
NET START "PnkBstrB"
START /d "C:\Program Files (x86)\Electronic Arts\Battlefield Bad Company 2" BFBC2Game.exe

The first two lines will start the two Punkbuster services PnkBstrA and PnkBstrB. The third line will launch the actual game, in this example it is Battlefield Bad Company 2. Make sure you edit the path to the game if it is installed in a different directory.

Save the text file and rename it to gamename.bat, e.g badcompany2.bat. Right-click the new bat file and select to run it as an administrator. The batch file should start the two Punkbuster Services and then the game.

Almost done. A nuisance is that we need to run the batch file with administrative privileges and the only direct way to do that is to right-click the file and select run as administrator. It is possible to run programs and shortcuts always as administrator in Windows Vista and Windows 7. Batch files on the other hand can not be configured this way. The solution is simple. Create a shortcut of the batch file that we have created, configure the shortcut to always run with administrative privileges to overcome the problem.

Right-click the batch file and select Create Shortcut from the menu. This should create a shortcut file in the same directory.
Right-click the shortcut file now and select Properties. Click on the Advanced button in the Shortcut tab.

badcompany shortcut

Check the box to always run as an administrator.

run as administrator

You can now place the shortcut into a location where you usually start the games.

Further problems

This should resolve the issue with the Punkbuster services running all the time. There are two problems associated with this. The first is that the two services continue to run after the user leaves the game. More troubling than this is the fact that one of the services, PnkBstrB will be set to run automatically again.

A semi-manual solution would be to create a second batch file to stop the services when executed using the Net STOP command. Experienced computer users might even find a way to create one batch file for everything that has been discussed here. If you do let us know in the comments.

Enjoyed the article?: Then sign-up for our free newsletter or RSS feed to kick off your day with the latest technology news and tips, or share the article with your friends and contacts on Facebook or Twitter.

Related Articles:

Services Suite, Better Windows Services Management
Windows Services Manager
Secure Windows Services Configuration
Configure Windows 7 Services To Start Delayed
Control Services From The System Tray



About the Author:Martin Brinkmann is a journalist from Germany who founded Ghacks Technology News Back in 2005. He is passionate about all things tech and knows the Internet and computers like the back of his hand. You can follow Martin on Facebook or Twitter.

Author: , Friday April 23, 2010 -
Tags:, , , ,


Responses so far:

  1. prupert says:

    Useful tip, glad to see you play Bad Company – but I’ve got it on PS3, not PC, ah well.

    Hmm, a ghacks gaming event, where all the ghackers get together for a big frag out, now that could be cool ;)

  2. bsod says:

    This should work, right?

    NET START “PnkBstrA”
    NET START “PnkBstrB”
    START /d “C:\Program Files (x86)\Electronic Arts\Battlefield Bad Company 2″ BFBC2Game.exe
    NET STOP “PnkBstrA”
    NET STOP “PnkBstrB”

    Once BFBC2Game.exe exits, the next commands are executed.

  3. bsod says:

    I think we need to add ‘/wait’ to the start command. I will confirm later when I’ll have access to Battlefield ;)
    I would also add “sc config” to set PunkBstrB back to “manual” (mind the space after “start= ”

    NET START “PnkBstrA”
    NET START “PnkBstrB”
    START /d /WAIT “C:\Program Files (x86)\Electronic Arts\Battlefield Bad Company 2″ BFBC2Game.exe
    NET STOP “PnkBstrA”
    NET STOP “PnkBstrB”
    sc config PnkBstrB start= demand

    • bsod says:

      I was almost correct, /d has to be followed by the path obviously.

      NET START “PnkBstrA”
      NET START “PnkBstrB”
      START /WAIT /d “C:\Program Files (x86)\Electronic Arts\Battlefield Bad Company 2″ BFBC2Game.exe
      NET STOP “PnkBstrA”
      NET STOP “PnkBstrB”
      sc config PnkBstrB start= demand

      But you have to run the updater sometimes, and since it launches the game itself, I’m not sure how START /WAIT will behave.

  4. Bob Smith says:

    what a lame name

  5. nelutu says:

    Working solution…create a batch file and copy this:

    SC CONFIG PnkBstrA start= demand
    SC CONFIG PnkBstrB start= demand
    NET STOP PnkBstrA
    NET STOP PnkBstrB
    EXIT

    when you finish game run this bat file,will stop both PB services and PnkBstrB remain to manual.

  6. Nathan Heinke says:

    This batch file 100% works

    @echo off
    NET START “PnkBstrA”
    NET START “PnkBstrB”
    cd /d “C:\Program Files\EA GAMES\Battlefield 2″
    start /w /high BF2.exe +menu 1 +fullscreen 1
    NET STOP “PnkBstrA”
    NET STOP “PnkBstrB”
    EXIT

  7. Nathan Heinke says:

    It will Wait till the game ends but it needs to be ran as an administrator!
    I guess you all no how to do that?!

  8. Alex Miller says:

    can this work for APB also? and will i have to download the game instead of putting it on Steam?

Leave a Reply   Follow Ghacks   Subscribe To Comment Rss

Subscribe without commenting

© 2005-2012 Ghacks.net. All Rights Reserved. Privacy Policy - About Us