Run Punkbuster Services Only When Needed - gHacks Tech News

Run Punkbuster Services Only When Needed

If you have recently installed a game that uses the anti-cheating software Punkbuster to limit 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 a game supporting it has not been started in that 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 that they run 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 then.

This means that you would have to manually start the services before launching the game, which is not comfortable.

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 you 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 start the two Punkbuster services PnkBstrA and PnkBstrB. The third line launches 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, or a different game.

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.

Summary
Run Punkbuster Services Only When Needed
Article Name
Run Punkbuster Services Only When Needed
Description
How to configure the anti-cheat software Punkbuster to only run when you play games that make actual use of it.
Author
Publisher
Ghacks Technology News
Logo




  • We need your help

    Advertising revenue is falling fast across the Internet, and independently-run sites like Ghacks are hit hardest by it. The advertising model in its current form is coming to an end, and we have to find other ways to continue operating this site.

    We are committed to keeping our content free and independent, which means no paywalls, no sponsored posts, no annoying ad formats (video ads) or subscription fees.

    If you like our content, and would like to help, please consider making a contribution:

    Comments

    1. prupert said on April 23, 2010 at 11:42 am
      Reply

      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 said on April 23, 2010 at 1:47 pm
      Reply

      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.

      1. Martin said on April 23, 2010 at 3:07 pm
        Reply

        I tried that bsod but it did not work in my case. Can you confirm that it is working?

    3. bsod said on April 23, 2010 at 4:41 pm
      Reply

      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

      1. bsod said on April 23, 2010 at 6:57 pm
        Reply

        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 said on April 23, 2010 at 8:17 pm
      Reply

      what a lame name

    5. nelutu said on April 29, 2010 at 3:15 am
      Reply

      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 said on May 28, 2010 at 6:30 pm
      Reply

      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 said on May 28, 2010 at 6:34 pm
      Reply

      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 said on January 13, 2012 at 5:05 am
      Reply

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

    9. mus said on December 7, 2013 at 4:51 pm
      Reply

      for origin games the game executable is closed before you can actually play a game through the browser portal, leading the services to be stopped again before you play the game.
      this is what i used, it will start up the services, then origin and lets you start the games from there, and stops the services when you close origin. also leaves the service startup to manual.
      made a shortcut to the batch script and set it to start minimized (in the shortcut properties>run>minimized) so you don’t really even notice the command window.

      @echo off
      NET START “PnkBstrA”
      NET START “PnkBstrB”
      start /w /d “C:\Program Files (x86)\Origin” Origin.exe
      NET STOP “PnkBstrA”
      NET STOP “PnkBstrB”
      sc config PnkBstrA start= demand
      sc config PnkBstrB start= demand
      EXIT

    10. Cuppachino said on November 6, 2015 at 3:50 pm
      Reply

      Thanks for the advice

    11. Gromber said on November 8, 2015 at 1:55 pm
      Reply

      you can hide the bat:

      create a invisible.vbs with this content and save it with the bat in the origin folder

      CreateObject(“Wscript.Shell”).Run “””” & WScript.Arguments(0) & “”””, 0, False

      then add this to the Origin shortcut:

      C:\Windows\System32\wscript.exe “C:\Program Files\Origin\invisible.vbs” “C:\Program Files\Origin\origin_punkbuster.bat”

    Leave a Reply