Skip to content

Instantly share code, notes, and snippets.

@thany
Created August 23, 2023 13:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thany/fee0a96035755733321a88ea73d1067e to your computer and use it in GitHub Desktop.
Save thany/fee0a96035755733321a88ea73d1067e to your computer and use it in GitHub Desktop.
Revive 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 Adding to autoruns
reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v GlobalProtect /t REG_EXPAND_SZ /d "%%ProgramFiles%%\Palo Alto Networks\GlobalProtect\PanGPA.exe" /f /reg:64
echo Setting service to automatic start
sc config PanGPS start= auto
echo Starting service
sc start PanGPS
echo Starting application
start "" "%ProgramFiles%\Palo Alto Networks\GlobalProtect\PanGPA.exe"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment