Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Script for enabling and disabling punkbuster malware when I want to play battlefield. Must be run as admin.
@ECHO OFF
::Flush DNS cache before starting anti-cheat software.
::I don't think punkbuster checks the DNS but VAC does: https://www.reddit.com/r/GlobalOffensive/comments/1y0kc1/
::This is just a precaution. pnkbstr is still a joke ;)
ECHO Flushing DNS...
ipconfig /flushdns
::Start A so we can play the game without being kicked.
ECHO Starting Punkbuster...
NET START "PnkBstrA"
::Pause while user plays
ECHO Keep this dialog open while playing. When finished playing, press any key to kill punkbuster.
PAUSE
::Stop punkbuster
ECHO Killing Punkbuster...
NET STOP "PnkBstrA"
NET STOP "PnkBstrB"
::Set services to manual start because punkbuster sets itself to auto everytime it runs.
ECHO Disabling auto start services...
REG add "HKLM\System\CurrentControlSet\services\PnkBstrB" /f /v "Start" /t REG_DWORD /d "3"
REG add "HKLM\System\CurrentControlSet\services\PnkBstrA" /f /v "Start" /t REG_DWORD /d "3"
PAUSE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment