Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Help me with a batch file  (Read 6593 times)

0 Members and 1 Guest are viewing this topic.

xcharge50

    Topic Starter


    Beginner

    Re: Help me with a batch file
    « Reply #15 on: February 16, 2009, 09:21:22 AM »
    If he's examining windows versions, there is a chance he wants the batch to run on windows 98, in which case SET /P is not available.

    You right! In other word : I'm attempting to make my batch the more compatible possible  :)

    GuruGary



      Adviser
      Re: Help me with a batch file
      « Reply #16 on: February 16, 2009, 11:42:23 AM »
      If you are making your script backwards compatible with Win9x, then be sure to modify your IPCONFIG commands because the Win9x version of IPCONFIG is very different from the Windows 2000 / Windows XP version of IPCONFIG
      Code: [Select]
      C:\Win98>ipconfig /?
      Windows 98 IP Configuration
      Command line options:
       /All - Display detailed information.
       /Batch [file] - Write to file or ./WINIPCFG.OUT
       /renew_all    - Renew   all adapters.
       /release_all  - Release all adapters.
       /renew   N    - Renew   adapter N.
       /release N    - Release adapter N.

      Code: [Select]
      C:\WindowsXP>ipconfig /?
      USAGE:
          ipconfig [/? | /all | /renew [adapter] | /release [adapter] |
                    /flushdns | /displaydns | /registerdns |
                    /showclassid adapter |
                    /setclassid adapter [classid] ]

      where
          adapter         Connection name
                         (wildcard characters * and ? allowed, see examples)

          Options:
             /?           Display this help message
             /all         Display full configuration information.
             /release     Release the IP address for the specified adapter.
             /renew       Renew the IP address for the specified adapter.
             /flushdns    Purges the DNS Resolver cache.
             /registerdns Refreshes all DHCP leases and re-registers DNS names
             /displaydns  Display the contents of the DNS Resolver Cache.
             /showclassid Displays all the dhcp class IDs allowed for adapter.
             /setclassid  Modifies the dhcp class id.

      The default is to display only the IP address, subnet mask and
      default gateway for each adapter bound to TCP/IP.

      For Release and Renew, if no adapter name is specified, then the IP address
      leases for all adapters bound to TCP/IP will be released or renewed.

      For Setclassid, if no ClassId is specified, then the ClassId is removed.

      Examples:
          > ipconfig                   ... Show information.
          > ipconfig /all              ... Show detailed information
          > ipconfig /renew            ... renew all adapters
          > ipconfig /renew EL*        ... renew any connection that has its
                                           name starting with EL
          > ipconfig /release *Con*    ... release all matching connections,
                                           eg. "Local Area Connection 1" or
                                               "Local Area Connection 2"

      xcharge50

        Topic Starter


        Beginner

        Re: Help me with a batch file
        « Reply #17 on: February 16, 2009, 01:43:02 PM »
        Thx for the notice GuruGary  :)  I will make some modification to my script.