MitsuMan Posted September 25, 2012 Share Posted September 25, 2012 Helloi have a question. is it possible to make a .bat file with commands. where use can chose to run a program...example Please chose with one1 Program1.exe 2 Program2.exethen when user press 1 the first install or if they press 2 the number 2 install..Can anone help me with that... Link to comment Share on other sites More sharing options...
gunsmokingman Posted September 25, 2012 Share Posted September 25, 2012 Here is Cmd Promt Script that gives 3 choiceDemo_Menu.cmd@Echo OffCLSCOLOR 9FMODE 62,9TITLE Demo Menu::This code is property of Gunsmokingman and Or Jake1Eye and you must have his permission to use.::This is only posted as example code and meant only to used as such.:MainCLSEcho.Echo This Is To Turn On Or Turn Off The Hiberfil.sysEcho.Echo Type 1 For This ChoiceEcho Type 2 For This ChoiceEcho Type Quit To Close WindowEcho.SET Choice=SET /P Choice=Type Choice Then Press Enter:IF /I '%Choice%'=='1' GOTO Item1IF /I '%Choice%'=='2' GOTO Item2IF /I '%Choice%'=='quit' GOTO TheEndECHO "%Choice%" is not valid. Please try again.SET /P = Press Enter To ContinueGOTO MAIN:Item1CLSEcho.Echo You Selected Choice 1ping -n 3 127.0.0.1>nulGoto TheEnd:Item2CLSEcho.Echo You Selected Choice 2ping -n 3 127.0.0.1>nulGoto TheEnd:TheEndExit Link to comment Share on other sites More sharing options...
MitsuMan Posted September 28, 2012 Author Share Posted September 28, 2012 HelloThank you very much for the help 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