1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Solved: Can not change the file, asked administrator permission

Discussion in 'Windows 7' started by hariklia, Nov 6, 2010.

Thread Status:
Not open for further replies.
Advertisement
  1. hariklia

    hariklia Thread Starter

    Joined:
    May 29, 2010
    Messages:
    36
    Hi, I have Windows 7, was trying to change one host file which involves adding one line to it and every time when I try to save it i get a response "can not change the file, ask permission from administrator". I am administrator and only one using this computer. I thought administrator is able to change files on a computer without a problem.I've read through other threads here regarding similar issues but none of them solves my problem.
    I'm not very tech savvy, so any help would be greatly appreciated.
    Thanks
    Biba
     
  2. Ent

    Ent Trusted Advisor

    Joined:
    Apr 11, 2009
    Messages:
    5,467
    First Name:
    Josiah
    That's the effect of UAC, you will have to click "run as administrator" at some point to get proper access.
    There are loads of ways to get at it, but this is the easiest.

    Click Start
    Type Notepad (if it isn't already showing in the list)
    Right click the shortcut to notepad.
    Click Run as Administrator. If necessary give confirmation.
    Navigate to and open the hosts file C:\Windows\System32\drivers\etc\hosts
    Make your change.
    Save
     
  3. hariklia

    hariklia Thread Starter

    Joined:
    May 29, 2010
    Messages:
    36
    This is what I tried:
    1.I find a host file in C:\Windows\System32\drivers\etc
    2. I open it with notepad
    3. change it
    4. when i try to save i get the prompt to ask administrator permission!
    At no point I have an option to run it as an administrator :confused:
    What is UAC and can I switch it off? If that solves the problem.
     
  4. Ent

    Ent Trusted Advisor

    Joined:
    Apr 11, 2009
    Messages:
    5,467
    First Name:
    Josiah
    That is why you have to run notepad as an administrator before hand. The alternative is to launch an administrator version of the command prompt or run box, and then open the file from there. That however is just plain nerdy, and more complicated.

    Regarding your question about UAC please refer to this article. I run with UAC on (and actually have to type a 15 character password every time I meet a prompt.) for the security benefit it brings. However you may find that turning it off makes things easier if you're used to an earlier version of Windows. That is also detailed in the article.
     
  5. hariklia

    hariklia Thread Starter

    Joined:
    May 29, 2010
    Messages:
    36
    Thank you for your reply Ent. I tried doing it as you suggested, run notepad as administrator, but when I locate that particular file its showing empty? I can locate it when I search for it directly but can't open it with notepad run as administrator.There must be something I need to change but I don't know what. Any ideas?
     
  6. Ent

    Ent Trusted Advisor

    Joined:
    Apr 11, 2009
    Messages:
    5,467
    First Name:
    Josiah
    Copy the following to notepad.
    Save it as Starthosts.bat
    Right click Starthosts.bat and click Run as administrator. Provide permission if necessary.

    Code:
    Notepad.exe C:\Windows\System32\drivers\etc\hosts
    If that doesn't work then try turning off UAC as explained in the linked article.
     
  7. hariklia

    hariklia Thread Starter

    Joined:
    May 29, 2010
    Messages:
    36
    Thank you very much, I've changed that file using the method above :)
    Thanks
    Biba
     
  8. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/960924

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice