Posts tagged ‘hosts file’

Editing the hosts file in Windows Vista

Windows Vista
Image via Wikipedia

For the few, who need to bypass the standard DNS settings or who develop and manage websites and need to edit hosts file are quite stuck up with the UAC in Micro$oft’s Windows Vista.

Here are the few ways to edit the hosts file in Windows Vista, which I came across while googling for the solution.

For non-frequent edits :

  1. Open Notepad with Administrative privileges by clicking StartAll Programs,Accessories, and then right-click Notepad and select to open as Administrator.
  2. Now that Notepad is open with Administrative privileges browse to (C:\Windows\System32\drivers\etc) in Notepad and open the hosts file.
  3. Now you can edit and save the hosts file.

For frequent editing

Here’s how to create a shortcut on your desktop and easily open your hosts file with Notepad and edit it.

  1. Send a shortcut to Notepad to your desktop by right-clicking Notepad in the start menu and selecting send to desktop.
  2. Right-click the shortcut to Notepad on your desktop and select properties.
  3. Click the advanced button near the bottom of the shortcut tab and check off run as administrator. Click OK in the advanced properties window.
  4. Replace “ %SystemRoot%\system32\notepad.exe with ” %SystemRoot%\system32\notepad.exe C:\Windows\System32\drivers\etc\hosts in the target box. Click OK in the properties window to save the changes.
  5. Now all you have to do is open that shortcut to open your hosts file with Notepad with administrative privileges.