Announcement

Collapse
No announcement yet.

hosts file not working

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

  • hosts file not working

    I have configured a server with a name in my hosts file on my PC. I use windows explorer to put on my desktop icon property - Target: the following command:

    //myserver/start/mybat.bat

    That works fine, but on some occassions (I have navision database client and nod32 installed) it seems to me that my hosts file contents simply disappears from my dns cache ( I could not find myserver in output of ipconfig /displaydns). Of course, when it happens I could not ping myserver, and I get message something like host unknown.

    I do not know what and how something on my PC cause that host file on c:\windows\system32\drivers\etc\hosts simply does not work as expected.


    Can I debug and see what the problems is? Whether some program locks hosts file?
    When I do repair of my local area connection, everything seems to be OK.
    The problems is that I have to have admin account to do that.

  • #2
    Re: hosts file not working

    What is the command being used in mybat.bat?

    Comment


    • #3
      Re: hosts file not working

      Originally posted by pereubu View Post
      Target: the following command:

      //myserver/start/mybat.bat
      should be written like
      \\myserver\start\mybat.bat

      And you may want to use the Lmhosts file to resolve NetBIOS names.


      \Rems

      This posting is provided "AS IS" with no warranties, and confers no rights.

      __________________

      ** Remember to give credit where credit's due **
      and leave Reputation Points for meaningful posts

      Comment


      • #4
        Re: hosts file not working

        That was my typo. No bat file is not what the problem is but the fact that myserver is not included in the output of command:

        ipconfig /displaydns

        It is that host file has to be included in the output of the command above, BUT SOMETIMES IT IS NOT. As consequence I could get successful:

        ping myserver

        Because myserver is unknown - there is no info about MYSERVER. Something delete temporarily the content of host file.
        lmhost is not what I am looking for.

        Comment


        • #5
          Re: hosts file not working

          myserver is a netbios name, so it will be worth adding it in to the lmhosts file as well.

          Not sure why your name keeps disappearing from the hosts file. I was interested in the sciopt in the batch file to see if that was somehow effecting the host file.

          Comment


          • #6
            Re: hosts file not working

            I do not have bat file, because it is installed by application software company. Ok, they use that because they do not want to use dns. So they install hosts, and it give them access to their server inside my lan.

            Well, I have nod32, navison agent etc on each xp. Sometimes, dns cache is not what I expect.

            Comment


            • #7
              Re: hosts file not working

              A few things you could check:
              Is it happening on that machine only?
              Have you done a full Antivirus scan?
              Maybe could try SFC /scannow .
              Caesar's cipher - 3

              ZKHQ BRX HYHQWXDOOB GHFLSKHU WKLV BRX ZLOO UHDOLVH LW ZDV D ZDVWH RI WLPH!

              SFX JNRS FC U6 MNGR

              Comment

              Working...
              X