Windows: How to Create Shortcut to Edit Hosts File
November 25, 2009 | In: Computers
Here’s a pretty nifty tip for web developers out there. If you’re using your Windows machine for web dev (or for some network-related power usage), you might find yourself editing your Hosts file quite often.
The nasty thing about having to do so is that the Hosts file is several directories deep. How-to Geek offers a really nifty way of creating a shortcut that immediately opens the Hosts file inside Notepad. This works for Windows Vista and 7.
1. Right-click on your desktop then select New -> Shortcut
2. In the location field, enter the following:
notepad c:\windows\system32\drivers\etc\hosts

3. Click Next, enter a name for the Shortcut then click finish.
4. Right click on the newly-created shortcut then select Properties.
5. Under the Shortcut tab, click Advanced. This will bring up the Advanced Propertise, check the box “Run as administrator.”

6. Click OK to close the dialog boxes.
Launching the shortcut automatically opens the Hosts file in Notepad. UAC would probably bug you though.
Related posts:
