Skip to content

Instantly share code, notes, and snippets.

@0XDE57
Last active November 8, 2022 02:09
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 0XDE57/742d29482ee073eb8560 to your computer and use it in GitHub Desktop.
Save 0XDE57/742d29482ee073eb8560 to your computer and use it in GitHub Desktop.
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
@0XDE57
Copy link
Author

0XDE57 commented Nov 8, 2022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment