Created
February 25, 2017 14:36
-
-
Save jayaregalinada/283c23196ccc6046c3e76668b097fb69 to your computer and use it in GitHub Desktop.
Add IP and URL to hosts file (Windows)
This file contains 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 | |
title Add Hosts | |
set arg1=%1 | |
set arg2=%2 | |
IF "%1"=="" goto empty | |
IF "%2"=="" goto empty | |
echo %arg1% %arg2% | |
echo %arg1% %arg2% >> %WINDIR%\System32\drivers\etc\hosts | |
goto commonexit | |
:empty | |
echo "Usage: addhosts {IP} {URL}" | |
exit /b 1 | |
:commonexit | |
pause |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment