Jump to content
Due to a large amount of spamers, accounts will now have to be approved by the Admins so please be patient. ×
IGNORED

Batch file help needed


Recommended Posts

I want the choice 1 or 2 to start as soon as the button 1 or button 2 are pressed how do I do this see below this is what I have so far

the choice is for 2 different startup options for jukebox software for a mate and his son 2 very diffrent tasts in music

os is winxp sp2

At the moment you need to press enter after making the choice

 

@echo off

CLS

echo.

echo SHED JUKEBOX FROM HELL

echo.

echo.

echo.

echo Welcome to the "SHED JUKEBOX FROM HELL".

echo

CLS

echo Please choose start up option:

echo.

echo.

echo 1. Stevies Music:

echo.

echo 2. Phillips Music:

echo.

echo.

echo Please choose an option:

pause

set /p choice=Enter a number:

if %choice% == 1 GOTO STEVE

if %choice% == 2 GOTO PHILLIP

 

:STEVE

c:

cd\jukebox

cd steve

START wincab.exe

GOTO ENND

 

:PHILLIP

CLS

c:

cd\jukebox

cd phillip

START wincab.exe

 

:ENND

Link to comment
Share on other sites

  • Administrators

Create a text file with the choices in it and have the batch file read the text file. Eg:

 

echo 1 > answer.txt

echo 2 >> answer.txt

menu.bat < answer.txt

 

Can't remember the exact syntax though

 

Brad

Link to comment
Share on other sites

@echo off
CLS
echo.
echo SHED JUKEBOX FROM HELL
echo.
echo.
echo.
echo Welcome to the "SHED JUKEBOX FROM HELL". 
echo
CLS
echo Please choose start up option:
echo.
echo.
echo 1. Stevies Music:
echo.
echo 2. Phillips Music:
echo.
echo.
CHOICE /C 12 /N /M "Please choose an option:"
IF ERRORLEVEL 1 GOTO STEVE
IF ERRORLEVEL 2 GOTO PHILLIP

:STEVE
c:
cd\jukebox
cd steve
START wincab.exe
GOTO ENND

:PHILLIP
CLS
c:
cd\jukebox
cd phillip
START wincab.exe

:ENND

Link to comment
Share on other sites

Hrm I was certain it was in the reskit.

 

The 32bit Windows Server 2003 reskit will work on 32bit Windows XP:

http://www.microsoft.com/downloads/details.aspx?familyid=9D467A69-57FF-4AE7-96EE-B18C4790CFFD&displaylang=en

 

But it doesn't seem to have the "choice" command in there. I'm confuzzled...

 

Any Microsoft guys here know where to get it (safely)?

Edited by elvis
Link to comment
Share on other sites

choice was in the NT resource kit, not sure about kit's after.

 

best bet is if you (or someone) has a Dos 6 or 95/98 install it should be in those by default, just copy choice.com over and it should work fine

 

Yeah I got a copy off of fraggles mame boot cd but it dosent work to well

well looks like I may need to install Delphi and go from there create an executable to do what i want here comes a 7 day project to chose 1 or 2 options:cool:

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...