Uh, I guess that my advice won’t work for programmers and admins then. I’m using Windows 7 under a non-admin / restricted account with UAC set to its default setting, level 3, and I don’t use command-line to edit. I do it the normal way :) -- I double-click it, it asks me for an admin password, then to chose a program to open it, I chose Notepad, edit it, it won’t let me save, I save to Desktop, then close Notepad and copy the file over, it asks me to copy or replace etc. etc.
BTW I just tried “edit c:\windows\system32\drivers\etc\hosts” in Win7 under both admin and non-admin accounts (had to replace ‘edit’ with ‘notepad’). It indeed opened the file but it won’t let me save the edits afterwards—probably due to Windows File Protection.
Uh, I guess that my advice won’t work for programmers and admins then. I’m using Windows 7 under a non-admin / restricted account with UAC set to its default setting, level 3, and I don’t use command-line to edit. I do it the normal way :) -- I double-click it, it asks me for an admin password, then to chose a program to open it, I chose Notepad, edit it, it won’t let me save, I save to Desktop, then close Notepad and copy the file over, it asks me to copy or replace etc. etc.
BTW I just tried “edit c:\windows\system32\drivers\etc\hosts” in Win7 under both admin and non-admin accounts (had to replace ‘edit’ with ‘notepad’). It indeed opened the file but it won’t let me save the edits afterwards—probably due to Windows File Protection.