Remotely edit windows host file?


Recommended Posts

On the computer with the hosts file, you could probably share out the Windows\System32\drivers\etc folder to the network so you can browse to that computer over the network & edit the hosts file. You'll need to make sure you set the correct share & file permissions to make that work.

e.g. if you share it out, in Notepad on your main computer you could open \\this-remote-computer\the-share-name\hosts directly. Or even just overwrite the hosts file using a batch file or something, if your plan is to overwrite it for whatever reason.

Every Windows computer has an administravite C$ share set up by default. If you have administrative access (username/password) to the computer, and you don't have windows file sharing blocked on the firewall, just run the following at a run dialog from the remote computer:

\\foo\c$

Where "foo" is either the hostname OR IP address of the remote machine you wish to modify. This should open it's C drive and allow you to view/modify the files as if you were sitting at the computer. If you get "Access Denied" or "Permission Denied" when trying to access the computer (Not "Timed Out" or anything), then just make sure you have "Simple File Sharing" turned off on the remote PC. If it's turned on, the machine will automatically assume the use of the "Guest" account instead of prompting you for a username/password.

  On 05/04/2011 at 01:18, Sharpstick68 said:

Is there a way to edit a host file to block websites remotely? like if I want to do it to a computer in my house I mean...

http://www.mvps.org/winhelp2002/hostswin7.htm

http://www.mvps.org/winhelp2002/hosts.htm

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.