Home / Software / Computer programming / Batch file with options
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] - (Bottom) Print
Author Topic: Batch file with options  (Read 359 times)
Fiala06
Topic Starter
Greenhorn



Posts: 8


« on: September 07, 2010, 12:17:10 PM »

I would like to create a batch file with options of software to install from our network. I've tried search google and couldnt really find what I was looking for but know its possible.

So when you start it I would like it to have like 12 options.

Type the number corresponding with he program you would like to install and press enter.

1 - Microsoft Office 2003
2 - Microsoft Office 2007
3 - Adobe Pro 9
...
...
...
and so on.

Any help would be greatly appreciated!
Thx

IP logged
Helpmeh
Egghead



Thanked: 116
Posts: 3,583

Experience: Experienced
OS: Windows XP


Roar.

1
« Reply #1 on: September 10, 2010, 04:18:35 PM »

Code: [Select]
@echo off
:loop
echo Install what?
echo 1 - Microsoft Office 2003
echo 2 - Microsoft Office 2007
echo 3 - Adobe Pro 9
...
...
...
set /p choice=Option #:
if "%choice%" GTR "NUMBER OF OPTIONS" cls & echo Invalid option! & goto loop
goto %choice%
:1
start install microsoft office 2003
exit
:2
start install microsoft office 2007
exit
:3
start install adobe pro 9
exit
...
OK?

You need to have one of these for each thing you want to install:
Code: [Select]
:NUMBER
start install PROGRAM
exit

Remember to properly add the installer.
IP logged

Where's MagicSpeed?
Quote from: 'matt'
He's playing a game called IRL. Great graphics, *censored* gameplay.
Pages: [1] - (Top) Print 
Home / Software / Computer programming / Batch file with options « previous next »
 


Login with username, password and session length

Old Forum Search | Forum Rules
Copyright © 2010 Computer Hope ® All rights reserved.
Powered by SMF 2.0 RC3 | SMF © 2006–2010, Simple Machines LLC
Page created in 0.092 seconds with 20 queries.