chon_ Posted September 2, 2004 Share Posted September 2, 2004 I've been reading some threads regarding this issue, but none of them convinced me on how they work. Here's what i want to do: execute a cmd file in runoncex that prompts the user with 4 different otions of software to install, let's say 1 Antivirus12 Antivirus23 Antivirus34 Antivirus4If user types "1" and hits enter, then Antivirus1 will be installed and exits cmd, if "2" is pressed Antivirus2 will be installed and cmd will exit, and so on.........But, if no key is pressed within 20 seconds, then setup must default to option 1 and install Antivirus1 & exit cmd, then continue with the rest of setup. Is there a tool to make this in an easy way?TIA Link to comment Share on other sites More sharing options...
evilvoice Posted September 2, 2004 Share Posted September 2, 2004 welll...i posted something like this earlier...ill update this post when Ive made it exactly to your specs... Link to comment Share on other sites More sharing options...
CoffeeFiend Posted September 3, 2004 Share Posted September 3, 2004 if you don't mind a console-style app ("dos"-like), a batchfile with choice.com can take care of that in no time. Link to comment Share on other sites More sharing options...
CoffeeFiend Posted September 3, 2004 Share Posted September 3, 2004 if you use this choice.exe instead http://www.usfamily.net/web/wpattinson/wil...util/choice.zip then you can do it like that:(pressing enter with no number, or pressing escape, or waiting 20 seconds will all choose option 1 as well)@echo offecho 1) install something avecho 2) install another avecho 3) install somecorp avecho 4) install nogood avchoice /C1234 /E /t1,20if errorlevel 255 goto av1if errorlevel 4 goto av4if errorlevel 3 goto av3if errorlevel 2 goto av2if errorlevel 1 goto av1if errorlevel 0 goto av1:av1echo installing something avrem (setup.exe here)goto end:av2echo installing another avrem (setup.exe here)goto end:av3echo installing somecorp avrem (setup.exe here)goto end:av4echo installing nogood avrem (setup.exe here):end Link to comment Share on other sites More sharing options...
chon_ Posted September 3, 2004 Author Share Posted September 3, 2004 Great! Thanks!Testing.....It worked as expected thaks again. Link to comment Share on other sites More sharing options...
MHz Posted September 3, 2004 Share Posted September 3, 2004 You need choice.com to do this? Link to comment Share on other sites More sharing options...
chon_ Posted September 3, 2004 Author Share Posted September 3, 2004 choice.exe form crahak's reply, i downloaded the file and copied it to $oem$\$$ Link to comment Share on other sites More sharing options...
MHz Posted September 3, 2004 Share Posted September 3, 2004 Cool, but you can do that from batch anyway without anything from outside. Link to comment Share on other sites More sharing options...
CoffeeFiend Posted September 3, 2004 Share Posted September 3, 2004 Great! Thanks!Testing.....It worked as expected thaks again.You're welcome Choice.com would work, but this clone has a few more functionnality and it's free... (choice.com coming from an old ms-dos -technically- would still require a license of the os it's coming from too... even though i can't see someone getting sued for that...)Why not Link to comment Share on other sites More sharing options...
CoffeeFiend Posted September 3, 2004 Share Posted September 3, 2004 You can do things like that w/o choice.com, but there won't be a nice time-out option available either (and a few more minor issues...)I don't see having to use a tiny app as an issue at all... Link to comment Share on other sites More sharing options...
MHz Posted September 3, 2004 Share Posted September 3, 2004 @crahakMaybe true, but I believe that you can do without choice.com. It's existance is dying for a reason. It's like the old goto and gosub commands are dead amongst the latter lauguages. I realize batch lauguage is restrictive, but I think that your dependency on choice.com is showing alot.BTW, do not let me take away, how helpful you are, towards people in need.Keep the good spirit going. Link to comment Share on other sites More sharing options...
CoffeeFiend Posted September 3, 2004 Share Posted September 3, 2004 Oh, don't worry, no issues...Choice.com is only needed because the scripting languages' limitations (there is no easy/proper way to have a timeout on the keystroke otherwise). The if goto is indeed a very old and ugly way of doing things, but until we can do select case (errorlevel) in a batchfile (although it would work in a vbscript), we're pretty much stuck with it. most scripting languages don't offer too much when it comes to console input unfortunately... And I think choice.com is "dying" mostly because nobody wants a dos-based install nowadays (they'd rather have a windows GUI setup made with something like autoplay media studio instead) along with pretty much all the other good old dos/command line utilities. Link to comment Share on other sites More sharing options...
MHz Posted September 3, 2004 Share Posted September 3, 2004 Sorry, your right. the timeout I did not see. Yes, batch langauge is limited.Please forgive me. Link to comment Share on other sites More sharing options...
CoffeeFiend Posted September 3, 2004 Share Posted September 3, 2004 There is nothing to be forgiven. I don't take such things to heart, life's too short for that Link to comment Share on other sites More sharing options...
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