funkyjunky Posted September 15, 2007 Share Posted September 15, 2007 Hey Guys,Firstly I am sorry that this is in the wrong board but i didnt know where to put it! (There isnt a batch files board )I guess I put it in Java as the people that read this must be quite clever :)AND i have no idea what programming language its in?Anyway, Im sure all you guys remember batch files.I thought i would make one to scare my brother... @echo offECHO 1. Learn More...ECHO 2. Go to Internet. (default)ECHO 3. Version.ECHO 4. Quit.CHOICE /C:1234 /N /T:2,5 Please choose a menu option.IF ERRORLEVEL == 4 GOTO QUIT_MENUIF ERRORLEVEL == 3 GOTO VERIF ERRORLEVEL == 2 GOTO RUN_INTIF ERRORLEVEL == 1 GOTO LEARN:LEARNECHO Websense Co. MS-DOS Parental ControlECHO UK EditionECHO To uninstall please contact adminastrator:RUN_INTSTART /MAX iexplore:VERECHO Version 3.12 - Updated on 09/03/07:QUIT_MENUECHO It is now safe to exit this program But it doesnt work when i open it...I cant tell whats up...al the other batch files i have made have worked perfectly...thanks for your time!Ed x Link to comment Share on other sites More sharing options...
spoonraker Posted September 18, 2007 Share Posted September 18, 2007 lol I like your theory on java programmers being smart, however I think it's flawed. I only program in java because I'm too lazy to convert this huge codebase to php, not because I'm smart :)oh and I have no idea about your batch program Link to comment Share on other sites More sharing options...
funkyjunky Posted September 19, 2007 Author Share Posted September 19, 2007 lol.I think i answered my own question though.I am using XP (obviosuly...) and i dont one of the commands is recognised in XP.Maybe i should dig up my old Win 95 :)Anyway i still need help!!!Thanks.ed x Link to comment Share on other sites More sharing options...
Synook Posted October 8, 2007 Share Posted October 8, 2007 IF ERRORLEVEL == 4 GOTO QUIT_MENUIF ERRORLEVEL == 3 GOTO VERIF ERRORLEVEL == 2 GOTO RUN_INTIF ERRORLEVEL == 1 GOTO LEARN Isn't the equality tester in DOS just "=", not "=="? I'm not sure. Link to comment Share on other sites More sharing options...
scott100 Posted February 10, 2008 Share Posted February 10, 2008 AND i have no idea what programming language its in?Batch files use internal DOS commandsLooks like your choice is causing the problems, try using this:CHOICE /c 1234 /m "Please choose a menu option." Link to comment Share on other sites More sharing options...
TehTechnicalGuy Posted July 19, 2012 Share Posted July 19, 2012 The problem is that xp does not have choice as one of it commands, you have to use the set command with the /p extension. Here's the corrected code @echo offECHO 1. Learn More...ECHO 2. Go to Internet. (default)ECHO 3. Version.ECHO 4. Quit.SET /P PUT_VARIABLE_HERE=IF %PUT_VARIABLE_HERE%==1 GOTO LEARNIF %PUT_VARIABLE_HERE%==2 GOTO RUN_INTIF %PUT_VARIABLE_HERE%==3 GOTO VERif %PUT_VARIABLE_HERE%==4 GOTO QUIT_MENU:LEARNECHO Websense Co. MS-DOS Parental ControlECHO UK EditionECHO To uninstall please contact administrator:RUN_INTSTART /MAX iexplore:VERECHO Version 3.12 - Updated on 09/03/07:QUIT_MENUECHO It is now safe to exit this program 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