Is MS-DOS 'Choice' command gone?

G

Guest

The WinXP help indicates that the 'choice' command has been eliminiated as an
MS-DOS command. I used that in some 'bat' files to get a 1-char input from
the user.

What can be used in its place? How do you get user input now in a 'bat' file?
 
K

kurttrail

Raisleger said:
The WinXP help indicates that the 'choice' command has been
eliminiated as an MS-DOS command. I used that in some 'bat' files to
get a 1-char input from the user.

What can be used in its place? How do you get user input now in a
'bat' file?

http://www.google.com/search?source...004-49,GGLD:en&q='choice'+command+bat+file+XP

--
Peace!
Kurt
Self-anointed Moderator
microscum.pubic.windowsexp.gonorrhea
http://microscum.com/mscommunity
"Trustworthy Computing" is only another example of an Oxymoron!
"Produkt-Aktivierung macht frei"
 
W

Wesley Vogel

Use the set command. Read on, McDuff.

Windows XP users who have batch files that utilize the choice command
should modify the batch file to use the set command.

Information about the set command.
http://www.computerhope.com/sethlp.htm

I can't get the sample batch file with "hello", "bye", or "test" to work
yet. But I'm still trying. :)

I wonder if choice can be copied from a machine Windows 98 machine? I
just searched my machine I have choice.exe and choice.com. They came
with ie-spyad.

ie-spyad ReadMe says CHOICE.COM apparently has compatibility issues with
the Windows XP command shell interpreter. CHOICE.EXE is compatible with
Windows XP.

CHOICE.EXE comes with Windows Server 2003, Standard Edition.

Choice.exe is part of the Windows 2000 Professional Resource Kit.

Windows 2000 Professional Resource Kit Tools
http://www.microsoft.com/windows2000/techinfo/reskit/rktour/pro/Pro_tools.asp#C

Some other ideas here...
Batch files - Ask For User Input
http://www.robvanderwoude.com/userinput.html

[[you can always steal a copy of CHOICE.EXE from a Win9x box. All
reports I've heard say it works just fine.]]
http://www.ericphelps.com/batch/userin/

If you weren't using that stupid CDO I'd attach a copy of choice.exe,
it's only 21KB.

Yep. It works...

----------------------
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\>choice /?
CHOICE [/C[:]choices] [/N] [/S] [/T[:]c,nn] [text]

/C[:]choices Specifies allowable keys. Default is YN
/N Do not display choices and ? at end of prompt string.
/S Treat choice keys as case sensitive.
/T[:]c,nn Default choice to c after nn seconds
text Prompt string to display

ERRORLEVEL is set to offset of key user presses in choices.
----------------------------
--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In
 
W

Wesley Vogel

I just figured out why my post was listed before yours and you posted
first. Your date is set incorrectly.

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Top