cworkman Posted August 17, 2010 Share Posted August 17, 2010 is there currently a way to add entries to the hosts file on windows using wpi? Link to comment Share on other sites More sharing options...
mritter Posted August 18, 2010 Share Posted August 18, 2010 No. That would be done better in a batch file. Link to comment Share on other sites More sharing options...
cworkman Posted August 18, 2010 Author Share Posted August 18, 2010 (edited) well while i was waiting on a reply i made a custom solution!if anyone else is interested here it is!usage is as followsto add an entry!hosts.exe "/Add:74.208.10.249 gs.apple.com" "/Add:74.208.105.171 gs.apple.com"to remove an entry!hosts.exe "/Remove:74.208.10.249 gs.apple.com" "/Remove:74.208.105.171 gs.apple.com"or mix & matchhosts.exe "/Add:74.208.10.249 gs.apple.com" "/Remove:74.208.105.171 gs.apple.com"NOTE: requires .Net Framework 2.0NOTE:this package adds the entries silently so you will not see any confirmation!NOTE: this host file on windows vista is located @ C:\Windows\System32\drivers\etc\hostsNOTE: if the hosts file on other versions of windows are located in a different location please let me know and i will add support!!hosts.zip Edited August 18, 2010 by cworkman Link to comment Share on other sites More sharing options...
EneergE Posted October 15, 2010 Share Posted October 15, 2010 Hmm, you could just use:echo 127.0.0.1 bannedsite.com >> %windir%\system32\drivers\etc\HOSTS Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now