My bat-program freezes after opening programs

July 8, 2011 at 06:19:38
Specs: Windows 7, intel core i5 2,53GHz/ 4GB ram
I'm trying to make a simel easy to use .bat-program that opens some preselected programs on my computer, and it works fine except after it opens firefox, iexplore and the calculator it freezes and will not continue.
here is the code used after having selected iexplore:

:e
cls
ECHO.
set b=
set /p b=Just open (o), open with specified adress (s) or back to internt menu (m):
if %b%==o goto g
if %b%==O goto g
if %b%==s goto h
if %b%==S goto h
if %b%==m goto 2
if %b%==M goto 2

:g
cls
ECHO Loading...
"C:\Program Files (x86)\Internet Explorer\iexplore.exe"
GOTO m

goto 2 takes you to the internett menu where you select firefox or iexplore.
goto m takes you to the main menu at the very start of the batch file.
In my book it should work, anyone care to help?

PS: Pardon anny writing misstakes i'm not from an English speaking country :P


See More: My bat-program freezes after opening programs

Report •

#1
July 8, 2011 at 09:01:21
It would be helpfull to have the whole batch file, as this is a stub, i dont see the code that actually starts anything, therefore it is impossible to tell you what is wrong with the code?

mike


Report •

#2
July 8, 2011 at 11:16:43
@ECHO OFF

color 31
title Easy Program Access

cls

:m

cls

ECHO.
ECHO Chose program to open:
ECHO.
ECHO 1. start Outlook Mail
ECHO.
ECHO 2. start internet
ECHO.
ECHO 3. start MSN
ECHO.
ECHO 4. start Spotify
ECHO.
ECHO 5. start Calculator
ECHO.
ECHO 6. open Games folder
ECHO.
ECHO 7. start Word
ECHO.
ECHO 8. start Excel
ECHO.
ECHO 9. start PowerPoint
ECHO.
ECHO 0. Exit
ECHO.

set a=
set /p a=Enter choice number:
if %a%==1 goto 1
if %a%==2 goto 2
if %a%==3 goto 3
if %a%==4 goto 4
if %a%==5 goto 5
if %a%==6 goto 6
if %a%==7 goto 7
if %a%==8 goto 8
if %a%==9 goto 9
if %a%==0 goto 0

goto m

:1
cls
ECHO Loading...
"C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Microsoft Office\Microsoft Office Outlook 2007.lnk"
GOTO m
GOTO m

:2
cls
ECHO.
ECHO internet menu
ECHO.
set b=
set /p b=Use firefox (f) or explorer (e). back to menu (m):
if %b%==f goto f
if %b%==F goto f
if %b%==e goto e
if %b%==E goto e
if %b%==m goto m
if %b%==M goto m

:f
cls
ECHO.
set b=
set /p b=Just open (o), open with specified adress (s) or back to internet menu (m):
if %b%==o goto o
if %b%==O goto o
if %b%==s goto s
if %b%==S goto s
if %b%==m goto 2
if %b%==M goto 2

:o
cls
ECHO Loading...
"C:\Program Files (x86)\Mozilla Firefox\firefox.exe"
GOTO m
GOTO m

:s
ECHO.
set c=
set /p C=Enter adress (remember http://www.) :
cls
ECHO Loading...
"C:\Program Files (x86)\Mozilla Firefox\firefox.exe" %c%
GOTO m
GOTO m

:e
cls
ECHO.
set b=
set /p b=Just open (o), open with specified adress (s) or back to internt menu (m):
if %b%==o goto g
if %b%==O goto g
if %b%==s goto h
if %b%==S goto h
if %b%==m goto 2
if %b%==M goto 2

:g
cls
ECHO Loading...
"C:\Program Files (x86)\Internet Explorer\iexplore.exe"
GOTO m
GOTO m

:h
ECHO.
set c=
set /p C=Enter adress (remember http://www.) :
cls
ECHO Loading...
"C:\Program Files (x86)\Internet Explorer\iexplore.exe" %c%
GOTO m
GOTO m

:3
cls
ECHO Loading...
"C:\Program Files (x86)\Windows Live\Messenger\msnmsgr.exe"
GOTO m
GOTO m

:4
cls
ECHO Loading...
"C:\Program Files (x86)\Spotify\spotify.exe"
GOTO m
GOTO m

:5
cls
ECHO Loading...
"%windir%\system32\calc.exe"
GOTO m
goto m

:6
cls
ECHO Loading...
start "" "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Games"
GOTO m
goto m

:7
cls
ECHO Loading...
"C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Microsoft Office\Microsoft Office Word 2007.lnk"
GOTO m
goto m

:8
cls
ECHO Loading...
"C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Microsoft Office\Microsoft Office Excel 2007.lnk"
GOTO m
goto m

:9
cls
ECHO Loading...
"C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Microsoft Office\Microsoft Office PowerPoint 2007.lnk"
GOTO m
goto m

:0
cls
set d=
set /p d=Are you sure you want to exit? Yes (y) or No (n):
if %d%==Y exit
if %d%==y exit
if %d%==N goto m
if %d%==n goto m


Report •
Related Solutions


Ask Question