Created
February 25, 2026 18:37
-
-
Save Ge0rg3/8de9d88d491366da8cf372dd1bcc2a23 to your computer and use it in GitHub Desktop.
Shut down TwinGate and open WireGuard
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @echo off | |
| REM ---------------------------------------- | |
| REM 1. Ensure script is running as Administrator | |
| REM ---------------------------------------- | |
| net session >nul 2>&1 | |
| if %errorlevel% neq 0 ( | |
| echo Requesting administrative privileges... | |
| powershell -Command "Start-Process '%~f0' -Verb RunAs" | |
| exit /b | |
| ) | |
| REM ---------------------------------------- | |
| REM 2. Stop Twingate service | |
| REM ---------------------------------------- | |
| sc stop Twingate.Service >nul 2>&1 | |
| REM Optional: give the service time to stop | |
| timeout /t 3 /nobreak >nul | |
| REM ---------------------------------------- | |
| REM 3. Kill Twingate UI process | |
| REM ---------------------------------------- | |
| taskkill /IM Twingate.exe /F >nul 2>&1 | |
| REM ---------------------------------------- | |
| REM 4. Launch WireGuard | |
| REM ---------------------------------------- | |
| start "" "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\WireGuard.lnk" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment