1. You are viewing our forum as a guest. For full access please Register. WindowsBBS.com is completely free, paid for by advertisers and donations.

Batch file HELL !

Discussion in 'Legacy Windows' started by nemesis, 2002/06/21.

Thread Status:
Not open for further replies.
  1. 2002/06/21
    nemesis

    nemesis Inactive Thread Starter

    Joined:
    2002/06/21
    Messages:
    2
    Likes Received:
    0
    Can someone explain why this batch file runs on NT4 but not on Win2k or XP ?

    It Shouldnt be too hard to see what I am trying to achieve (he says)

    I manage about 10 domains and want two simple batch file's that allow me to choose the Server Manager and User Manger domain i want to start, in teh same way you can type "srvmgr DOMAIN-NAME" at the Start-Run prompt....

    Here is the batch file contents...

    =======================
    @ECHO OFF
    :SHOW_MENU
    ECHO 1 - GE_UK
    ECHO 2 - NCC_EUROPE
    ECHO 3 - GRP_WINDLESHAM
    ECHO 4 - BOCPP
    ECHO 5 - BOCRAS

    :GET_CHOICE
    choice /c:123 "choose one... "

    rem see TechNet Q69576 for why this is done like this
    if errorlevel 5 if not errorlevel 6 goto 5
    if errorlevel 4 if not errorlevel 5 goto 4
    if errorlevel 3 if not errorlevel 4 goto 3
    if errorlevel 2 if not errorlevel 3 goto 2
    if errorlevel 1 if not errorlevel 2 goto 1

    :5
    set DOM=BOCRAS
    goto DO_IT

    :4
    set DOM=BOCPP
    goto DO_IT

    :3
    set DOM=GRP_WINDLESHAM
    goto DO_IT

    :2
    set DOM=NCC_EUROPE
    goto DO_IT

    :1
    set DOM=GE_UK
    goto DO_IT

    :DO_IT
    echo "Server Manager for %DOM% "
    srvmgr %DOM%
    echo "Completed "
    =================================

    The error message I get is this...

    =================================
    'choice' is not recognized as an internal or external command,
    operable program or batch file.
    =================================

    It is my understanding from google that CHOICE is not a usable command in a win2k environment...

    So how the hell am I suppossed to get a choice menu shown ?

    Been bugging me for about 2 weeks now...

    Any help for this BBS newbie would be appreciated !

    Cheers

    Nemesis
     
    Last edited: 2002/06/21
  2. 2002/06/21
    brett

    brett Inactive Alumni

    Joined:
    2002/01/11
    Messages:
    2,058
    Likes Received:
    0
    You can download a copy of choice.com here or download as part of the MS-DOS 6.22 Supplemental Disk (a bigger download) here.

    BTW - welcome to the boards :)
     
    Last edited: 2002/06/21

  3. to hide this advert.

  4. 2002/06/21
    Zephyr

    Zephyr Inactive

    Joined:
    2002/01/21
    Messages:
    1,519
    Likes Received:
    0
    In addition to that, you can extract the choice.com file from your win9x disk cab files. Place it in the windows\system32 directory of course.
     
  5. 2002/06/22
    nemesis

    nemesis Inactive Thread Starter

    Joined:
    2002/06/21
    Messages:
    2
    Likes Received:
    0
    Thanks so much for the info !

    Will endevour to be a tight member of the community !
     
Thread Status:
Not open for further replies.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.