I need some help with my current Java Batch File that I deploy through SCCM. I need to now have in the begining of the script before the force closures to see if java version 7u67 is install and if it is exit the script, but if it isnt run the rest of the script. Below is my current script:
***Install.cmd ***
@echo off
cls
:KillIE&JavaProcesses
echo *** This will kill Browsers and Java Processes ***
Rem ***
taskkill /F /IM iexplorer.exe
taskkill /F /IM iexplore.exe
taskkill /F /IM firefox.exe
taskkill /F /IM chrome.exe
taskkill /F /IM jusched.exe
taskkill /F /IM jp2launcher.exe
taskkill /F /IM java.exe
taskkill /F /IM javaw.exe
taskkill /F /IM jqs.exe
:UninstallingOldJREVersions
echo.************************************************************************
echo.************************************************************************
echo. DO NOT CLOSE THIS WINDOW
echo. All the Java versions from your computer are being removed.
echo.************************************************************************
echo.************************************************************************
wmic product where "name like 'Java(TM) 6%%'" call uninstall
wmic product where "name like 'Java 7%%'" call uninstall
REM Install JRE x86
msiexec.exe /i "%~dp0jre1.7.0_67.msi" /quiet /norestart AUTOUPDATECHECK=0 JAVAUPDATE=0 JU=0 IEXPLORER=1 MOZILLA=1
:end
REM Return the exit code to SCCM
exit /B %EXIT_CODE%