http://Blackbox - simple but...

Discussion in 'Home Networking' started by Flemming L. Baerentsen, Jun 14, 2007.

  1. Flemming L. Baerentsen

    Dave J. Guest

    In MsgID<4677b2dc$0$844$> on Tue, 19 Jun 2007
    12:43:36 +0200, in uk.comp.home-networking, 'Flemming L. Baerentsen'
    wrote:
    Assuming 'Blackbox' has a static IP.

    Would it not be simpler to create an 'installation' bat file for them to
    run on each machine? The file (called anything.bat) has to contain

    echo 192.168.1.10 blackbox >> %windir%\system32\drivers\etc\hosts

    and it will add the required entry automagically when executed. Obviously,
    replace 192.168.1.10 with the actual IP of blackbox.

    I can't remember if the initial hosts file under windows finishes with a
    carriage return, so it's possible you'd get a glitch doing the above in
    that the entry would be tacked onto the last line in the blank (comments
    only) file. Try it and see. If it is a problem then the cure is to use

    echo # >> %windir%\system32\drivers\etc\hosts | echo 192.168.1.10 blackbox
    as the batch file line instead. Without newlines, ie all entered on one
    line. It may be better to do it that way anyhow as it's then guaranteed to
    work regardless of any changes that have already been made.

    To anyone observant, 'doze ignores the comment character (#) if it occurs
    at the end of a hostname in the hosts file.

    Oh, and if you'd rather let the users copy and paste something then the
    above line prefixed with 'cmd /c ' will work equally well if entered into
    the 'run' box from the start menu.

    Dave J.
     
    Dave J., Oct 20, 2007
    #21
    1. Advertisements

  2. Hi Dave,

    Problem here is that the IP is unknown for the PC user as the Blackbox does
    not have static IP. We do not know which IP-scheme the customer is using at
    his/her network.

    Regards
    Flemming
     
    Flemming L. Baerentsen, Nov 23, 2007
    #22
    1. Advertisements

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.