Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hello and sorry about my bad english!
I didn't find any solution in my problem by googling around so... (simply because I don't know the keywords to search)
I need to build batch to install different programs. The problem is that i don't know how to make this very simple way. Running Batch ask user which programs do you want to istall. Output would be something like this: 1, 2, 5 ,7. From these numbers batch should install programs that correspond the numbers given by user. Problem is that if I have 15 programs and user inputs numbers 1,2,5,7 how to separate those in single variables...
In simple words I need a Batch where user can choose which programs to install. There would be about 15 programs listed by numbers. User gives corresponding numeber(s) and then batch install those programs.

I hope your basic batch know-how can support you in scripting what is no way a simple task.
About your question see the code below
@Echo Off
:LOOP
Set /P PGM#=Enter PGM Number^>For /L %%J in (1,1,15) Do (
If "%%J"=="%PGM#%" GoTo :%PGM#%)
GoTo :LOOP:1
Echo Install [%PGM#%]
GoTo :EOF:2
Echo Install[%PGM#%]
GoTo :EOFand so on

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |