As a web application developer, you need to make changes to the Windows hosts file from time to time, to resolve IP addresses. This is something I’d done frequently with Windows XP but never tried it on Windows 7 before. And like the stubborn mule that Windows 7 is, it obsolutely refused to let me write to the hosts file.
None of the following worked:
- Run notepad as Administrator.
- Set UAC to minimum (not recommended by the way).
- Change hosts file security so I have read/write/full control.
- Take ownership of the hosts file.
- Turn off router, and stop my firewall and anti-virus.
- Reboot numerous times
Then I eventually found the solution: Restart in safe mode without network (hold down F8 during BIOS initialisation screen), open notepad as Administrator, and finally Windows 7 let me save my changes. I can’t believe something so trivial was that difficult. Security overkill perhaps?