Skip to content

Instantly share code, notes, and snippets.

@thany
Created August 23, 2023 13:17
Show Gist options
  • Save thany/d2e9a88a8300c55a97d63a6ac412743d to your computer and use it in GitHub Desktop.
Save thany/d2e9a88a8300c55a97d63a6ac412743d to your computer and use it in GitHub Desktop.
Kill GlobalProtect VPN service
@echo off
echo Checking for administrative permissions
if not "%1"=="am_admin" (powershell start -verb runas '%0' am_admin & exit /b)
echo Deleting from autoruns
reg delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v GlobalProtect /f /reg:64
echo Stopping service
sc stop PanGPS
echo Setting service to disabled
sc config PanGPS start= disabled
echo Killing processes
taskkill /f /im PanGPS.exe
taskkill /f /im PanGPA.exe
@skibidisigmaboyrizzler
Copy link

it gives me a error saying The process "PanGPS.exe" with PID 5860 could not be terminated.

@thany
Copy link
Author

thany commented May 1, 2025

@skibidisigmaboyrizzler
I dunno, maybe your permissions, even when elevated, are still somehow not enough. Your pc might be locked down in some kind of way, or you've got something else amiss. Either way, "could not be terminated" doesn't really carry enough information to know what the issue is.

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