Viewing by month: January 2008

Jan 4 2008

Vista Hosts File, How to Edit Easily without UAC Block

Since upgrading(?) to Vista several things have driven me bonkers including editing my hosts file. You can't just open it, edit it and save like you did in XP. Instead you must have a program, like Notepad, open and in the 'run as administrator' mode.
Simple enough right? No. Constantly I open the file, start editing it and then save only to find I was supposed to open Notepad first, in administrator mode, then search through and find the hosts file in a series of non-intuitive folders unless you live and breathe in the system32 folder.

You could turn off this security issues by disabling UAC, but I've been trying to live and learn with it, since the concept is sound, even if annoying.

Here's the Vista hosts file quick fix that lets you double click a shortcut, edit the file and move on.

1)Right-click your desktop (or any folder) select New -> Shortcut.
2)Where it asks for the location of the item put "C:\Windows\System32\notepad.exe C:\Windows\System32\drivers\etc\hosts". Click Next. (This assumes you want to use Notepad to edit and your hosts file is the default folder structure)
3)Name your shortcut. Something like "Vista hosts file" will work, whatever you choose. Click Finish.
4)Right-click your new Shortcut and select "Properties".
5)Click the "Advanced.." button in the lower right.
6)Checkmark "Run As Administrator". Click Ok. Click Ok.

Now you are set. Double-click your icon, Vista will automatically ask you for admin permissions, click continue, edit your hosts file, and whistfully save without permission errors popping up all over and causing you to have to start all over again, derailing the train of thought you were really trying to execute.

2 comments - Posted by cheyennejack at 1:39 PM - Categories: Windows Tips