Created
February 25, 2026 18:37
-
-
Save Ge0rg3/aa48dd0a010f27be64931ca1d0d9d332 to your computer and use it in GitHub Desktop.
Shut down WireGuard and open TwinGate
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. Kill WireGuard process (Admin) | |
| REM ---------------------------------------- | |
| taskkill /IM wireguard.exe /F >nul 2>&1 | |
| REM ---------------------------------------- | |
| REM 3. Start Twingate service | |
| REM ---------------------------------------- | |
| sc start Twingate.Service >nul 2>&1 | |
| REM Optional: wait for service startup | |
| timeout /t 3 /nobreak >nul | |
| REM ---------------------------------------- | |
| REM 4. Launch Twingate UI | |
| REM ---------------------------------------- | |
| start "" "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Twingate.lnk" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment