Editing hosts file error

Background :

When editing the hosts file in windows7 with notepad++, an error appears “please check if this file is opened in another program”.

Capture of error :

Solution :

Launch notepad++ with role of administrator, and re-open hosts by notepad, it could be saved.
But how could we launch an application(ex. notepad) automaticly by administrator in windows7 ?

Waiting for the answers !


3 comments on “Editing hosts file error

  1. I had this problem, too.

    First, close all instances of Notepad++.

    Then, find “Notepad++” in your start menu, right click it and select “Run as administrator”.

    Finally, in Notepad++ go to File –> Open, choose C:\Windows\System32\drivers\etc\hosts and make your changes.

    This worked for me… I hope it helps!

    • Thank you Scoot, that’s what I did, it works well, but it is a little boring to select the path each time 😦
      I created a shortcut of directory etc, and I could open host with admin more easier 🙂

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s