Always Get Better

Never stop looking for ways to improve

April 18th, 2008

Windows Vista keeps the HOSTS file locked down so only users with elevated permission can edit it.  I found the fastest way to add lines to this file in my own system was:

  1. Open the directory containing the file (C:\Windows\System32\drivers\etc\hosts)
  2. Copy the file to my Documents directory by right-clicking Send To…
  3. Editing the file in UltraEdit (or notepad, or whatever)
  4. Moving the file back to the etc directory.

The act of moving it back causes Windows to prompt you for privilege elevation.  It’s possible to raise your text editor’s privileges, but going in through the command line – at least to me – seems like a much longer and more tedious way of doing the same thing.

Related posts:

  1. Windows Azure Thoughts – First Six Months
  2. Ensure SLA with Multiple Web Role Instances on Windows Azure

  • Mike Wilson (158)
  • Leave a Reply