Skip to content

Instantly share code, notes, and snippets.

@nezza
Created April 20, 2020 14:25
Show Gist options
  • Save nezza/fc8b0081f5d1343e02d22e5953b9bdd8 to your computer and use it in GitHub Desktop.
Save nezza/fc8b0081f5d1343e02d22e5953b9bdd8 to your computer and use it in GitHub Desktop.
@echo off
REM Save this file i.e. to your Desktop. Whenever you want to disable Vanguard,
REM simply run it as Administrator.
REM If you run VALORANT while VGK is deactivated it will re-install it and ask you to reboot.
REM You can adjust the path to Vanguard here:
set VGK_PATH="C:\Program Files\Riot Vanguard\vgk.sys"
REM Check whether VGK.SYS exists
if exist %VGK_PATH% (
goto deactivate
) else (
goto activate
)
:activate
SET /P AREYOUSURE=Enable Vanguard (Y/N)?
IF /I "%AREYOUSURE%" NEQ "Y" GOTO END
move %VGK_PATH%.deactivated %VGK_PATH%
goto SOFTEND
:deactivate
SET /P AREYOUSURE=Disable Vanguard (Y/N)?
IF /I "%AREYOUSURE%" NEQ "Y" GOTO END
move %VGK_PATH% %VGK_PATH%.deactivated
:SOFTEND
echo.
echo.
echo.
echo Done! You need to restart your machine for these changes to take effect!
echo.
echo.
echo Press any key to quit this script.
pause >nul
:END
@hutilicious
Copy link

hutilicious commented Dec 18, 2020

Just wanted to share my solution. It disables both services and removes Vanguard from auto start.
Run as admin.

enable:

sc config vgk start=system
sc config vgc start=demand
powershell -Command "Set-ItemProperty -Path HKLM:\Software\Microsoft\Windows\CurrentVersion\Explorer\StartupApproved\Run -Name 'Riot Vanguard' -Value ([byte[]](0x02,00,00,00,00,00,00,00,00,00,00,00))

disable:

sc config vgc start=disabled
sc config vgk start=disabled
powershell -Command "Set-ItemProperty -Path HKLM:\Software\Microsoft\Windows\CurrentVersion\Explorer\StartupApproved\Run -Name 'Riot Vanguard'  -Value ([byte[]](0x33,0x32,0xFF))"

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