Skip to content

Instantly share code, notes, and snippets.

@nmalayev
Created September 22, 2020 03:01
Show Gist options
  • Save nmalayev/70d224936c787cb65ad279b38db027cd to your computer and use it in GitHub Desktop.
Save nmalayev/70d224936c787cb65ad279b38db027cd to your computer and use it in GitHub Desktop.
Add local.priceline.com dns config to Windows hosts
@ECHO off
ECHO Getting Default Gateway and adding to hosts.conf
for /F "tokens=13" %%x in ('"ipconfig /renew * > nul & ipconfig | findstr "Default Gateway" | findstr "[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*""') do (
@echo %%x local.priceline.com >> C:\Windows\System32\drivers\etc\hosts
echo %%x local.priceline.com
)
PAUSE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment