Jump to content

Choice command


Recommended Posts

hello... im doing my unattended cd and id like to know if there was some way so the .cmd file could ask if u wanted to install this or that program while its doing it. is there some way to do that?

thanks :)

Link to comment
Share on other sites


Here is a simple example of yes/no batch, if this is what you asked for

@echo off
:PLOOP
 SET Choice=
 SET /P Choice="Apply private settings? (Y/N)"
 IF NOT '%Choice%'=='' SET Choice=%Choice:~0,1%
 IF /I '%Choice%'=='Y' GOTO PRIVATE
 IF /I '%Choice%'=='N' GOTO SKIPP
 ECHO Yes or No!
 GOTO PLOOP
:PRIVATE
rem Here goes code if you choose YES
echo YES
pause
exit
:SKIPP
rem Here goes code if you choose NO
echo NO
pause
exit

Of course you can change names like PRIVATE, SKIPP, PLOOP etc...

Link to comment
Share on other sites

yes :)

thanks a lot!!

im presently trying to simplifiate it and make it work for me :rolleyes:

*EDIT*: done :D its all modified

echo the choices are:
echo.
echo 1 - Kazaa K++
echo 2 - Nero Burning ROM Ultra edition
echo 3 - Steam
echo 4 - Mirc
echo 5 - Azureus BT Client
echo 6 - Ad Aware 6
echo 7 - FlashFXP 2.1
echo 8 - Lightning Download
echo 0 - Quit (please choose this instead of quitting normally
echo           because it will delete the temp files and restart.)
echo.
:Choice
SET /P Choice="What Program?"
IF /I '%Choice%'=='1' GOTO Kazaa
IF /I '%Choice%'=='2' GOTO Nero
IF /I '%Choice%'=='3' GOTO Steam
IF /I '%Choice%'=='4' GOTO Mirc
IF /I '%Choice%'=='5' GOTO Azureus
IF /I '%Choice%'=='6' GOTO AAW6
IF /I '%Choice%'=='7' GOTO FlashFXP
IF /I '%Choice%'=='8' GOTO Lightning
IF /I '%Choice%'=='0' GOTO Quit
ECHO Please choose a number. Thanks.
GOTO Choice

:Kazaa
ECHO.
ECHO installing Kazza Lite K++...
start /wait %systemdrive%\Progs\KliteKpp\klitekpp243e.exe /silent
GOTO Choice

:Nero
ECHO.
ECHO installing Nero Burning ROM Ultra edition...
start /wait %systemdrive%\Progs\Nero\Nero60015.exe /silent /noreboot /no_ui /sn=xxxx-xxxx-xxxx-xxxx-xxxx-xxxx/write_sn
GOTO Choice

:Steam
ECHO.
ECHO installing Steam...
start /wait %systemdrive%\Progs\Steam\Steaminstall.exe /s
GOTO Choice

(...)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...