• Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
  • Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

How do I save the hosts file in Windows?

Collapse
X
  •  
  • Filter
  • Time
  • Show
Clear All
new posts

    How do I save the hosts file in Windows?

    I've made a small change but when I try to save I get:

    "Cannot create the C:\WINDOWS\system32\drivers\etc\hosts file.

    Make sure that the path and filename are correct."

    How do I save?
    "I can put any old tat in my sig, put quotes around it and attribute to someone of whom I've heard, to make it sound true."
    - Voltaire/Benjamin Franklin/Anne Frank...

    #2
    Originally posted by cojak View Post
    I've made a small change but when I try to save I get:

    "Cannot create the C:\WINDOWS\system32\drivers\etc\hosts file.

    Make sure that the path and filename are correct."

    How do I save?
    If you are using Windows 7 or Vista, you need to modify the file with elevated rights (i.e. run notepad in "Run this as an Admin" mode). Then you can save the file directly into the system32\drivers\etc\ directory.

    HTH.
    If your company is the best place to work in, for a mere £500 p/d, you can advertise here.

    Comment


      #3
      You can have a desktop shortcut:

      'notepad C:\WINDOWS\system32\drivers\etc\hosts'

      Comment


        #4
        'Snot R/O is it?

        .... only asking.....

        Comment


          #5
          Originally posted by Drewster View Post
          'Snot R/O is it?

          .... only asking.....
          Two words.

          Windows
          Security

          Comment


            #6
            Originally posted by stek View Post
            You can have a desktop shortcut:

            'notepad C:\WINDOWS\system32\drivers\etc\hosts'
            The shortcut would need to run as an administrator for that to work.
            If your company is the best place to work in, for a mere £500 p/d, you can advertise here.

            Comment


              #7
              Originally posted by pmeswani View Post
              The shortcut would need to run as an administrator for that to work.
              Works on the Citrix tulipe we have at work and we aren't admins!

              Point taken tho - u can add the 'runas' bit I can't remember the syntax for it anymore, hardly ever use Windows thank God.

              Would it be:

              'runas DOMAIN\user "notepad C:\WINDOWS\system32\drivers\etc\hosts"'

              vi /etc/hosts is sooo much easier....

              Comment


                #8
                Thanks guys.
                "I can put any old tat in my sig, put quotes around it and attribute to someone of whom I've heard, to make it sound true."
                - Voltaire/Benjamin Franklin/Anne Frank...

                Comment


                  #9
                  Spybot has locked my hosts file.

                  I'm trying to get into it now...
                  "I can put any old tat in my sig, put quotes around it and attribute to someone of whom I've heard, to make it sound true."
                  - Voltaire/Benjamin Franklin/Anne Frank...

                  Comment


                    #10
                    Originally posted by stek View Post
                    Works on the Citrix tulipe we have at work and we aren't admins!

                    Point taken tho - u can add the 'runas' bit I can't remember the syntax for it anymore, hardly ever use Windows thank God.

                    Would it be:

                    'runas DOMAIN\user "notepad C:\WINDOWS\system32\drivers\etc\hosts"'

                    vi /etc/hosts is sooo much easier....
                    Can't comment on Citrix stuff. May be able to open a file, but unless the file permissions allow you to modify / save the file, I would be surprised if it would work.
                    If your company is the best place to work in, for a mere £500 p/d, you can advertise here.

                    Comment

                    Working...
                    X