unable to change hosts file

Discussion in 'Windows 7 Help and Support' started by BMN84, Apr 11, 2010.

  1. BMN84

    BMN84 New Member

    Joined:
    Apr 11, 2010
    Messages:
    6
    Likes Received:
    0
    Hello everyone,

    I'm using windows 7 x64 Ultimate
    I want to edit my hosts file.
    I've found it in the directory C:\Windows\winsxs\amd64_microsoft-windows-w..nfrastructure-other_31bf3856ad364e35_6.1.7600.16385_none_6079f415110c0210.

    The problem is I can't edit it in no way.
    I've tried:
    Open Notepad as administrator -> open file -> edit -> and save.
    I've tried to manage privileges.
    Nothing works,

    Does someone else know a solution for this problem?

    Thanx
    Bjørn
     
  2. Saltgrass

    Saltgrass Excellent Member
    Microsoft Community Contributor

    Joined:
    Oct 16, 2009
    Messages:
    15,157
    Likes Received:
    393
    It is actually in the \Windows\System32\drivers\etc folder.

    As for changing it, when I tried once, I found the same thing.

    If you really want to change it, you will probably do something to give yourself control, or copy it to another location and then try to move it back. This can be a little complicated, so look for tutorials about taking ownership.
     
  3. BMN84

    BMN84 New Member

    Joined:
    Apr 11, 2010
    Messages:
    6
    Likes Received:
    0
    re: re: unable to..

    Dear Saltgrass,

    I've tried editing the file you mentioned. But this isn't the file I need.
    Because it doesn't work for me there.
    So I'm looking for other solutions.

    Greetz
    Bjørn
     
  4. Celestra

    Celestra Former Moderator

    Joined:
    Jan 15, 2008
    Messages:
    2,468
    Likes Received:
    14
    See if taking ownership helps first

    Take Ownership Shortcut - Windows 7 Forums

    Is the file you want really in the place it says it is ? If not, you need to find its location. If recent try "ipconfig/flushdns" Then it's a matter of dragging a copy of the host file to the desktop, edit that, then drag the copy back to its rightful place.
     
  5. BMN84

    BMN84 New Member

    Joined:
    Apr 11, 2010
    Messages:
    6
    Likes Received:
    0
    FIXED: unable to change hosts file

    Hello Celesta,

    That did the trick
    thanx
     
  6. WhisperAtStars

    WhisperAtStars New Member

    Joined:
    Oct 1, 2010
    Messages:
    2
    Likes Received:
    0
    HELP! I've tried EVERY suggestion I can find and still can't edit my hosts file! I'm using Windows 7 Home Premium 64 bit and no matter what I try, all I can get when I open the hosts file is the "sample" version of the page with no useful content or ability to see what my actual hosts file looks like.

    I have already tried:
    -Opening Notepad "as administrator"... same thing...
    -Changing Ownership of the file... same thing...
    -Copying the file to Desktop, in hopes the permissions will then allow editing... same thing
    -Changing permissions... same thing...

    What do I have to do to edit this file? This is making me crazy and everyone who has "answered" this question so far online is acting like it's the easiest thing in the world and I'm a moron for not trying all of the above... But I HAVE tried all of the above to no avail! PLEASE HELP ASAP!
     
  7. TorrentG

    TorrentG Banned

    Joined:
    May 31, 2010
    Messages:
    7,814
    Likes Received:
    372
    The sample is your hosts file and is what's there as default. Nothing weird going on.

    Right click the desktop and choose "new" then "shortcut".

    Copy and paste this into the location entry line: %windir%\system32\notepad.exe "%SystemRoot%\system32\DRIVERS\etc\hosts"

    Hit next and type Hosts for the shortcut name.

    Click or double click the shortcut to open it. After editing, hit ctrl+s on the keyboard to save.
     
  8. Saltgrass

    Saltgrass Excellent Member
    Microsoft Community Contributor

    Joined:
    Oct 16, 2009
    Messages:
    15,157
    Likes Received:
    393
    You may have to run the Hosts shortcut as Admin...
     

Share This Page

Loading...