erz- Posted April 22, 2005 Posted April 22, 2005 Hi, for my first post i would like to thanks this community for the informations that powered ( sorry for English, i'm French ). So i have just a question, i have by batch like that :echo.echo VideoLan Player VLC0.81start /wait %systemdrive%\applications\vlc-0.8.1-win32.exe /Secho.echo Amsn0.94start /wait %systemdrive%\applications\Amsn-Pack-0.94.exe /n /Secho. ....I want to know if its possible in the batch to makin choice by o/n. LikeWould you like to install ... ? [o/n]if o is pressed the software is installed if n the bacth ignore install and go to the next softwareThanks
vcBlackBox Posted April 22, 2005 Posted April 22, 2005 You mean something like thisset choice=set /p choice=Do you want to install VideoLan Player (y/n)?if not '%choice%'=='' set choice=%choice:~0,1%if '%choice%'=='y' goto Yesif '%choice%'=='n' goto Amsn:Yesstart /wait %systemdrive%\applications\vlc-0.8.1-win32.exe /Sgoto Amsn:Amsnset choice=set /p choice=Do you want to install blah, blah (y/n)?if not '%choice%'=='' set choice=%choice:~0,1%if '%choice%'=='y' goto Yesif '%choice%'=='n' goto NextItem........
tarquel Posted April 25, 2005 Posted April 25, 2005 just an additional two-cents question herehad been using the command choice for 9x and 2003 and was a little annoyed that there's no choice command by default for xp...is there a timeout for the set /p command?i.e. if the user doesn't answer in x seconds then option x is chosen by default (like the choice command does)Many thanks,Nath.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now