I call several batch scripts from a master batch script (that I use for maintenance) without any issue but there is this one script that will not exit when it's done running and I don't know why. When I simply run the script it does exactly what I expect it to do - it executes and then exits when it is done running (CMD window closes). When I call the script from my master script it executes (in a separate window, which is what I want) but its CMD window doesn't close.
I call all my batch scripts like this: Start /wait Call "<script>"
I can't for the life of me figure out why the CMD window won't close for this one.
Here's the Chrome script:
cls
@echo off
TITLE Google Chrome Updater
Set /P=Installing Google Chrome and dependencies.....<NUL
taskkill /im chrome.exe /f >NUL 2>&1
::-----Install Chrome-----::
Start /wait MSIEXEC.EXE /I "\\<pathtoInstaller>\GoogleChromeStandaloneEnterprise64.msi" /qb-! >NUL
::-----Install Legacy Browser Support-----::
Start /wait MSIEXEC.EXE /I "\\<pathtoInstaller>\LegacyBrowserSupport_5.9.0.0_en_x64.msi" /qb-! >NUL
Echo Done!
timeout /t 4 >NUL
Set /P=Configuring Google Chrome..... <NUL
del "C:\Users\Public\Desktop\*.lnk" /Q >NUL 2>&1
sc stop "gupdate" >NUL
sc config "gupdate" start= disabled >NUL
sc stop "gupdatem" >NUL
sc config "gupdatem" start= disabled >NUL
schtasks /delete /tn GoogleUpdateTaskMachineCore /f >NUL 2>&1
schtasks /delete /tn GoogleUpdateTaskMachineUA /f >NUL 2>&1
Echo Done!
Exit /B %ErrorLevel%
pause
The pause at the end is for testing. I can confirm that the script actually exits at Exit /B because the "pause" is not executed. With or without the "pause" the CMD window doesn't close. Help!