Cannot Save Hosts File in Vista

Having recently upgraded to Windows Vista to get to grips with IIS7 I opened up the Hosts file to add in a host header for local web development, upon saving it informed me it couldn’t save.

There’s a very simple solution to this:

  1. Click Start
  2. Click All Programs
  3. Click Accessories
  4. Right-click Notepad
  5. Select Run as administrator

Now when you save the hosts file it will allow you to update. If you’re user is not setup as an Administrator you may be asked to enter the administrator password.

Have fun!