Skip to content

Instantly share code, notes, and snippets.

@amitkhare
Created February 23, 2021 13:26
Show Gist options
  • Save amitkhare/61e876ec05bbb07338576abb9ea796b4 to your computer and use it in GitHub Desktop.
Save amitkhare/61e876ec05bbb07338576abb9ea796b4 to your computer and use it in GitHub Desktop.
Opens running code server at default gateway port 9090 in chrome as app.
@echo off
netsh wlan show interfaces | Findstr /c:"Signal" && set "CStatus=true" || set "CStatus=false"
for /f "tokens=2,3 delims={,}" %%a in ('"WMIC NICConfig where IPEnabled="True" get DefaultIPGateway /value | find "I" "') do set "location=%%a"
set location=%location:"=%
IF /i "%CStatus%"=="true" "C:\Program Files\Google\Chrome\Application\chrome.exe" --new-window --app=https://%location%:9090
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment