Created
July 19, 2020 18:22
-
-
Save andreasneuber/d7233841f1386bb2cfb7f989e3b846ea to your computer and use it in GitHub Desktop.
Windows - Batch for adding entries to host file
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 | |
TITLE=Update Hosts File | |
set /p ip_address="Enter ip adress: " | |
set /p domain="Enter domain: " | |
copy C:\Windows\System32\drivers\etc\hosts C:\Windows\System32\drivers\etc\hosts.bck | |
ECHO. >> C:\Windows\System32\drivers\etc\hosts | |
ECHO %ip_address% %domain% >> C:\Windows\System32\drivers\etc\hosts | |
PAUSE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment