I’ve been trying to use the “choice” batch command, but it seems that it is not available in XP. Also, I must have forgotten all I knew about batch files, as I can’t remember how to implement a simple Y/N conditional function. I would appreciate any help.
![]() |
There are isolated problems with current patches, but they are well-known and documented on this site. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
-
Batch File Choice Command (XP Home)
Home » Forums » AskWoody support » Windows » Windows Vista, XP and earlier » Questions: Vista, XP back to 3.1 » Batch File Choice Command (XP Home)
- This topic has 5 replies, 5 voices, and was last updated 19 years, 1 month ago.
AuthorTopicWSChuck Tucker
AskWoody LoungerApril 12, 2006 at 2:08 am #431301Viewing 1 reply threadAuthorReplies-
WSHansV
AskWoody LoungerApril 12, 2006 at 4:10 am #1009311Choice is not available in Windows XP indeed. See Microsoft Windows XP – Command-line reference A-Z. There is a section about batch files.
-
WSJohnGray
AskWoody LoungerApril 12, 2006 at 4:27 am #1009315You have (at least!) two choices [tee-hee]!
Either copy CHOICE.EXE from a previous version of Windows into a directory in the standard path (e.g. Windows or WindowsSystem32), and use it like you ued to,
or investigate the SET /P command, ‘recently’ introduced. Here’s a clunky BATch file to demonstrate:@echo off :loop set /p answer="Reply Y or N to this question " if /i "%answer%"=="Y" echo Chuck said Yes! & goto replyyes if /i "%answer%"=="N" echo Chuck said No! & goto replyno goto loop :replyyes Here do what you wish for a Y answer :replyno Here do what you wish for a N answer
To find out more, do SET /? and/or IF /? in a Command Prompt window. There are various other BATch file sites on the internet I can point you at, but Hans’ link has more-or-less what you get from the /? commands I suggested!
John
-
WSChuck Tucker
AskWoody Lounger -
byteme
AskWoody Plus -
joep517
AskWoody MVPApril 13, 2006 at 12:21 pm #1009551If you want a glimpse of the future follow some of the links at Monad Search Results. Scripting: Monad: The Future of Windows Scripting — TechNet Magazine, November
--Joe
-
-
Viewing 1 reply thread -

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
Rufus is available from the MSFT Store
by
PL1
2 hours, 41 minutes ago -
Microsoft : Ending USB-C® Port Confusion
by
Alex5723
4 hours, 50 minutes ago -
KB5061768 update for Intel vPro processor
by
drmark
1 hour, 4 minutes ago -
Outlook 365 classic has exhausted all shared resources
by
drmark
3 hours, 1 minute ago -
My Simple Word 2010 Macro Is Not Working
by
mbennett555
36 minutes ago -
Office gets current release
by
Susan Bradley
3 hours, 13 minutes ago -
FBI: Still Using One of These Old Routers? It’s Vulnerable to Hackers
by
Alex5723
1 day, 17 hours ago -
Windows AI Local Only no NPU required!
by
RetiredGeek
1 day, 1 hour ago -
Stop the OneDrive defaults
by
CWBillow
1 day, 18 hours ago -
Windows 11 Insider Preview build 27868 released to Canary
by
joep517
2 days, 4 hours ago -
X Suspends Encrypted DMs
by
Alex5723
2 days, 6 hours ago -
WSJ : My Robot and Me AI generated movie
by
Alex5723
2 days, 6 hours ago -
Botnet hacks 9,000+ ASUS routers to add persistent SSH backdoor
by
Alex5723
2 days, 7 hours ago -
OpenAI model sabotages shutdown code
by
Cybertooth
2 days, 7 hours ago -
Backup and access old e-mails after company e-mail address is terminated
by
M W Leijendekker
1 day, 19 hours ago -
Enabling Secureboot
by
ITguy
2 days, 2 hours ago -
Windows hosting exposes additional bugs
by
Susan Bradley
2 days, 15 hours ago -
No more rounded corners??
by
CWBillow
2 days, 11 hours ago -
Android 15 and IPV6
by
Win7and10
2 days, 1 hour ago -
KB5058405 might fail to install with recovery error 0xc0000098 in ACPI.sys
by
Susan Bradley
3 days, 4 hours ago -
T-Mobile’s T-Life App has a “Screen Recording Tool” Turned on
by
Alex5723
3 days, 6 hours ago -
Windows 11 Insider Preview Build 26100.4202 (24H2) released to Release Preview
by
joep517
3 days, 1 hour ago -
Windows Update orchestration platform to update all software
by
Alex5723
3 days, 14 hours ago -
May preview updates
by
Susan Bradley
3 days, 1 hour ago -
Microsoft releases KB5061977 Windows 11 24H2, Server 2025 emergency out of band
by
Alex5723
2 days, 17 hours ago -
Just got this pop-up page while browsing
by
Alex5723
3 days, 6 hours ago -
KB5058379 / KB 5061768 Failures
by
crown
3 days, 3 hours ago -
Windows 10 23H2 Good to Update to ?
by
jkitc
2 days, 5 hours ago -
At last – installation of 24H2
by
Botswana12
4 days, 5 hours ago -
MS-DEFCON 4: As good as it gets
by
Susan Bradley
3 hours, 29 minutes ago
Recent blog posts
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.