![]() |
![]() |
![]() |
|||||
![]() |
![]() |
![]() |
![]() |
![]() |
|||
| Welcome
to Tech Support Forum home to more then 136,000 problems solved. Issues
have included: Spyware, Malware, Virus Issues, Windows, Microsoft,
Linux, Networking, Security, Hardware, and Gaming Getting your
problem solved is as easy as: 1. Registering for a free account 2. Asking your question 3. Receiving an answer Registered members: * See fewer ads. * And much more..
|
| Want to know how to post a question? click here | Having problems with spyware and pop-ups? First Steps |
|
|||||||
| Programming A discussion forum for programs and programming used in tech-related businesses. |
![]() |
|
|
LinkBack | Thread Tools |
|
|
#1 (permalink) |
|
Registered User
Join Date: Jul 2008
Location: Leicester
Posts: 60
OS: Windows XP
|
Hi im kinda new to batch commands and i am trying to make a easy to use installer that users can use to install things easly..
so far i have made it so they can choose from a list what they want using the numbers 1-9 but how can i have it so they can type 11 and it goto choice 11 and not 1?? @ECHO off cls :start CLS ECHO Please Choose What You Wish To Install. (Press Number Keys) ECHO ............................................................ ECHO 1. Music Match Jukebox ECHO 2. other ECHO 3. something els set choice= set /p choice=I wish to install option if not '%choice%'=='' set choice=%choice:~0,1% if '%choice%'=='1' goto musicmatch if '%choice%'=='2' goto bye if '%choice%'=='3' goto test [I WANT TO ADD HIGHER THAN 9 HERE LIKE UP TO 20] ECHO "%choice%" is not valid please try again ECHO. goto start :musicmatch CLS ECHO This will now install Music Match Jukebox Pause CLS Start \Setup.exe ECHO Starting installer... :bye CLS ECHO BYE goto end :test CLS ECHO TEST goto end :end ECHO DONE Pause
__________________
/Never to young to tamper\
|--------Besty-Tech--------| |------------The------------| \______Teenage Tech______/ |
|
|
|
| Important Information |
|
Join the #1 Tech Support Forum Today - It's Totally Free!
TechSupportForum.com is a leading support website for your computer needs. We offer free, friendly and personalized computer support. Why pay to have your computer fixed when you can do it for free. Join TechSupportforum.com Today - Click Here |
|
|
#2 (permalink) |
|
Tech Hardware Team
Join Date: Jul 2005
Posts: 1,459
OS: Windows
|
Re: More than 1-10 in batch???
Hi Besty, are you making a custom CD or executable archive?
Do you know there is freeware that can do this? You can make your own custom GUI with pictures or buttons instead of a batch file. Anyway, here's your answer... set /a counter=0 set choice= set /p choice=I wish to install option: set /a counter= %counter%+%choice% if %counter% ==1 (goto :musicmatch) if %counter% ==2 (goto :bye) if %counter% ==3 (goto :test) if %counter% ==4 (goto :test) if %counter% ==5 (goto :test) if %counter% ==6 (goto :test) if %counter% ==7 (goto :test) if %counter% ==8 (goto :test) if %counter% ==9 (goto :test) if %counter% ==10 (goto :works) if %counter% ==11 (goto :end) ECHO. ECHO "%choice%" is not valid...please try again pause goto :start
__________________
|
|
|
|
|
|
#3 (permalink) |
|
Registered User
Join Date: Jul 2008
Location: Leicester
Posts: 60
OS: Windows XP
|
Re: More than 1-10 in batch???
Oh I see you use a counter rather than choice.
and what programs do you know of because i am trying to make a cd that when you pop it in the cd will load the batch file and give you the options to install different programs. i know that a exe would be better but im not that advanced in programing and i found batch to be easy XD
__________________
/Never to young to tamper\
|--------Besty-Tech--------| |------------The------------| \______Teenage Tech______/ |
|
|
|
|
|
#4 (permalink) | |
|
Tech Hardware Team
Join Date: Jul 2005
Posts: 1,459
OS: Windows
|
Re: More than 1-10 in batch???
Quote:
------------------------------------------------- I have used DeepBurner (freeware) for years to burn CD/DVD's because I've never had any problems with it. (Threw away too many bad burns trying other more popular software.) It can make an autorun menu and you can customize the background and buttons with your own. On the download page there are two freeware choices: DeepBurner Free 1.9 DeepBurner Free 1.9 (portable edition) {This version can be put on a usb stick so you can use it on any computer.} autorun.jpg Sample of autorun menu made with deepburner, for the background I selected custom and used a bmp file-it will be shown at actual size, so resize if necessary before selecting it. I used the default buttons for menu selections and made the exit button instead of using the defaultexit. {note: the blue border is my desktop, not part of the menu.} -------------------------------------------------- An even more versatile presentation can be made by using a HTML file for the autorun (loads in a browser like a web page). Since it's like any web page you can do audio, video, images, versatile text for your descriptions, etc... your imagination is the limit. Use an HTML editor to make your page and then use something like AutorunCD Assistant or CIS Smart CD-Menu Creator to launch it in your CD. CIS Smart CD-Menu Creator also makes simple menus so you can do more than just launch the HTML. ------------------------------------------------- Quick Menu Builder also makes nice customized menus that can be put on CD or used from a folder, though I haven't used it on any windows version newer than Win98 (never got it to install properly on win2000-though all menus made on w98 transfered to w2k worked okay).
__________________
Last edited by Stu_computer; 10-08-2008 at 09:06 PM. |
|
|
|
|
![]() |
| Thread Tools | |
|
|