I am trying to send a package that contains the MSI for java and a batch file that runs to uninstall any old version of java and then execute the new java.
The problem is that when sending the package everything will go well until the part of installing the new Java.
The package is sent, the contents are downloaded to the CCMCache, the batch runs and uninstalls the old version of java, then it stalls for an hour or so and fails.
batch file is as follows:
REM uninstall all the older Java Installs
wmic product where "name like 'Java%%'" call uninstall /nointeractive
REM install the newest version of Java
msiexec /i "\\trc-sccm01\d$\Java 8.0.45\jre1.8.0_45.msi" /Qb JU=0 JAVAUPDATE=0 AUTOUPDATECHECK=0 RebootYesNo=No WEB_JAVA=1 WEB_JAVA_SECURITY_LEVEL=H
REM delete the autoupdater
If exist "C:\Program Files (x86)\Common Files\Java" del /S /F /Q "C:\Program Files (x86)\Common Files\Java"
If exist "C:\Program Files\Common Files\Java" del /S /F /Q "C:\Program Files\Common Files\Java"
The computer has access to the server and if ran by double clicking it from the file share OR locally from CCMCache it installs without a problem in less than two minutes.
I have exhausted google on this problem and advice would be greatly appreciated.