System Administrators who are following my tutorial to block twitter, facebook and other social networking sites have complained that the trick doesn’t work on Windows 7 and Vista as they can’t edit the Hosts file. Whenever they try to edit the Hosts file on Vista, they get the error, make sure your path name is correct, while saving the file. The fact is that you can still block social networking sites on Windows 7 or Vista using Hosts file, you just need to edit it as an administrator. Here’s how to do this-
Editing Hosts File in Windows 7 and Vista
1. Go to Start > All Programs > Accessories, right click on Notepad and select Open as Administrator.
2. Now you’ll have a notepad that is running as an administrator. Go to File > Open, browse to C:\Windows\System32\drivers\etc. Select All Files from the drop down just above the Open button and then open the Hosts file for editing.
Now just save the Hosts file after you are done, and you’ll not see any error this time.
This trick also applies to other files as well. If you can’t save a file after editing in Windows 7 or Vista, just edit it as an administrator.