Last active
June 25, 2022 07:59
-
-
Save realdomdom/f07d4d58b9554708a57eb8f7fd47e263 to your computer and use it in GitHub Desktop.
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 | |
SETLOCAL EnableExtensions | |
set EXE=Cloudflare WARP.exe | |
FOR /F %%x IN ('tasklist /NH /FI "IMAGENAME eq %EXE%"') DO IF %%x == %EXE% goto STOP | |
mshta 'vbscript:Execute("CreateObject(""shell.application"").ShellExecute""net"",""start CloudflareWARP"","""",""runas"",1:close")' | |
timeout /T 10 /nobreak | |
CD "C:\Program Files\Cloudflare\Cloudflare WARP\" | |
START "" "C:\Program Files\Cloudflare\Cloudflare WARP\Cloudflare WARP.exe" | |
exit | |
:EOF | |
:STOP | |
taskkill /im "Cloudflare WARP.exe" | |
mshta 'vbscript:Execute("CreateObject(""shell.application"").ShellExecute""net"",""stop CloudflareWARP"","""",""runas"",1:close")' | |
exit | |
:EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment