You may often need to open a file as administrator than regular user in Windows. But being treated as regular users we couldn't perform the action as easily as we would have in case of other files. While we can view the contents of the file even though we are not granted the administrative previleges we cannot save that file as we might receive an error popping up something like this.

 

 

Error while saving hosts file.

However What if the only account inhereting the system or the administrator account cannot edit and save these files?

So Here is the remedy for the above question. Let us take an example for editing and saving the hosts file (Which is often used to block unwanted sites).

  1. Go to Start and search notepad.
  2. Right click on notepad and click on Run as administrator.Running Notepad as administrator
  3. A Blank Notepad opens and there you go to File-->Open.
  4. Navigate to:
    C:\Windows\System32\drivers\etc
  5. Select hosts file.
  6. Now You can see that you can actually edit the hosts file.

Note: Your hosts file must look something like this before editing:Hosts File


Login