How to rename an entry in Windows Hosts file

Discussion in 'Computer Support' started by NP, May 9, 2008.

  1. NP

    NP Guest

    My windows Hosts file is look like this.



    # Copyright (c) 1993-1999 Microsoft Corp.
    #
    # This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
    #
    # This file contains the mappings of IP addresses to host names. Each
    # entry should be kept on an individual line. The IP address should
    # be placed in the first column followed by the corresponding host
    name.
    # The IP address and the host name should be separated by at least one
    # space.
    #
    # Additionally, comments (such as these) may be inserted on individual
    # lines or following the machine name denoted by a '#' symbol.
    #
    # For example:
    #
    # 102.54.94.97 rhino.acme.com # source server
    # 38.25.63.10 x.acme.com # x client host

    127.0.0.1 localhost
    192.168.100.244 NHub
    192.168.100.246 DRHub


    In this I need put a # entry in front of 192.168.100.246 IP address
    (#192.168.100.246 DRHub). Basically I need to bypass of reading
    192.168.100.246 DRHub. Other entries should remain as it is. Can you
    all help me to give a script (batch file or vb script) because I need
    apply this 500 computers via Active Directory. Thanks in advance.
     
    NP, May 9, 2008
    #1
    1. Advertising

  2. NP

    chuckcar Guest

    NP <> wrote in
    news::

    > My windows Hosts file is look like this.
    >
    >
    >
    > # Copyright (c) 1993-1999 Microsoft Corp.
    > #
    > # This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
    > #
    > # This file contains the mappings of IP addresses to host names. Each
    > # entry should be kept on an individual line. The IP address should
    > # be placed in the first column followed by the corresponding host
    > name.
    > # The IP address and the host name should be separated by at least one
    > # space.
    > #
    > # Additionally, comments (such as these) may be inserted on individual
    > # lines or following the machine name denoted by a '#' symbol.
    > #
    > # For example:
    > #
    > # 102.54.94.97 rhino.acme.com # source server
    > # 38.25.63.10 x.acme.com # x client host
    >
    > 127.0.0.1 localhost
    > 192.168.100.244 NHub
    > 192.168.100.246 DRHub
    >
    >
    > In this I need put a # entry in front of 192.168.100.246 IP address
    > (#192.168.100.246 DRHub). Basically I need to bypass of reading
    > 192.168.100.246 DRHub. Other entries should remain as it is. Can you
    > all help me to give a script (batch file or vb script) because I need
    > apply this 500 computers via Active Directory. Thanks in advance.
    >

    And the reason and IP address you aren't going to tell us, why?

    --
    (setq (chuck nil) car(chuck) )
     
    chuckcar, May 9, 2008
    #2
    1. Advertising

  3. NP

    why? Guest

    On Fri, 9 May 2008 01:04:56 -0700 (PDT), NP wrote:

    >My windows Hosts file is look like this.


    Unless really needed, don't use HOSTS. You mentioned AD, so you
    mostlikely have a DNS that all 500 PCs use? Change 1 entry not 500
    files/PCs.

    <snip pointless sample / comment lines>

    >127.0.0.1 localhost
    >192.168.100.244 NHub
    >192.168.100.246 DRHub
    >
    >
    >In this I need put a # entry in front of 192.168.100.246 IP address
    >(#192.168.100.246 DRHub). Basically I need to bypass of reading
    >192.168.100.246 DRHub. Other entries should remain as it is. Can you


    Ah, sample file may or may not contail other entries.

    >all help me to give a script (batch file or vb script) because I need
    >apply this 500 computers via Active Directory. Thanks in advance.


    Do you know how many scripting sites, forums , MS scripting and AD
    newsgroups there are?

    I don't as I haven't bothered looking.

    Oh, ok then, there are lots.

    Me
     
    why?, May 10, 2008
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Oxford Systems

    Windows XP Pro hosts file problems?

    Oxford Systems, Mar 2, 2004, in forum: Computer Support
    Replies:
    6
    Views:
    27,425
    Mike245
    Mar 3, 2004
  2. Quimbler

    Hosts file in Windows ME.

    Quimbler, Jan 30, 2005, in forum: Computer Support
    Replies:
    7
    Views:
    1,346
    Toolman Tim
    Feb 1, 2005
  3. Replies:
    2
    Views:
    991
  4. spec
    Replies:
    7
    Views:
    1,306
    Peter
    Jun 5, 2006
  5. Replies:
    7
    Views:
    1,595
    fred-bloggs
    Mar 31, 2006
Loading...

Share This Page