Skip to content

Instantly share code, notes, and snippets.

@jayaregalinada
Created February 25, 2017 14:38
Show Gist options
  • Save jayaregalinada/be0a671afad79d4230851fcf4ef9f199 to your computer and use it in GitHub Desktop.
Save jayaregalinada/be0a671afad79d4230851fcf4ef9f199 to your computer and use it in GitHub Desktop.
Add hosts with prompt
@echo off
title Add hosts
set /p ip=Enter IP:
set /p url=Enter URL:
echo %ip% : %url%
echo %ip% %url% >> %WINDIR%\System32\drivers\etc\hosts
goto commonexit
:commonexit
pause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment