Solution to replace all JRE's
Hi There,
I'd like to thank some people here for posting about replacing jre's and such. This is what i combined from some posts;
disable_jre_update.reg:
If you have any tips or tricks for this beginner to improve this, please let me know :)
I'd like to thank some people here for posting about replacing jre's and such. This is what i combined from some posts;
@echo off
cls
if not exist %windir%\jre_1606_inst_ok.log (
net use o: \\server\software\Deployed\jre_gpo
rem Remove JRE 1.4.1_x:
o:\IDriver.exe /M{CD0159C9-17FB-11D6-A76A-00B0D079AF64} /uninst
o:\IDriver.exe /M{1666FA7C-CB5F-11D6-A78C-00B0D079AF64} /uninst
o:\IDriver.exe /M{EFCE5837-FC21-11D6-9D24-00010240CE95} /uninst
o:\IDriver.exe /M{C4B03AEB-33D3-11D7-9D37-00010240CE95} /uninst
o:\IDriver.exe /M{ACD27BF3-7CDC-11D7-9D4D-00010240CE95} /uninst
o:\IDriver.exe /M{78D082B3-ACEE-11D7-9D64-00010240CE95} /uninst
o:\IDriver.exe /M{6B2F032F-CC54-11D7-9D67-00010240CE95} /uninst
o:\IDriver.exe /M{CA532E73-1BB7-11D8-9D6A-00010240CE95} /uninst
rem Remove JRE 1.4.2_x:
o:\msiexec /x {7148F0A7-6813-11D6-A77B-00B0D0142000} /qn
o:\msiexec /x {7148F0A7-6813-11D6-A77B-00B0D0142010} /qn
o:\msiexec /x {7148F0A7-6813-11D6-A77B-00B0D0142020} /qn
o:\msiexec /x {7148F0A7-6813-11D6-A77B-00B0D0142030} /qn
o:\msiexec /x {7148F0A7-6813-11D6-A77B-00B0D0142040} /qn
o:\msiexec /x {7148F0A7-6813-11D6-A77B-00B0D0142050} /qn
o:\msiexec /x {7148F0A7-6813-11D6-A77B-00B0D0142060} /qn
o:\msiexec /x {7148F0A7-6813-11D6-A77B-00B0D0142070} /qn
o:\msiexec /x {7148F0A7-6813-11D6-A77B-00B0D0142080} /qn
o:\msiexec /x {7148F0A7-6813-11D6-A77B-00B0D0142090} /qn
o:\msiexec /x {7148F0A7-6813-11D6-A77B-00B0D0142100} /qn
o:\msiexec /x {7148F0A7-6813-11D6-A77B-00B0D0142110} /qn
o:\msiexec /x {7148F0A7-6813-11D6-A77B-00B0D0142120} /qn
rem Remove JRE 1.5.0_x:
o:\msiexec /x {3248F0A8-6813-11D6-A77B-00B0D0150000} /qn
o:\msiexec /x {3248F0A8-6813-11D6-A77B-00B0D0150010} /qn
o:\msiexec /x {3248F0A8-6813-11D6-A77B-00B0D0150020} /qn
o:\msiexec /x {3248F0A8-6813-11D6-A77B-00B0D0150030} /qn
o:\msiexec /x {3248F0A8-6813-11D6-A77B-00B0D0150040} /qn
o:\msiexec /x {3248F0A8-6813-11D6-A77B-00B0D0150050} /qn
o:\msiexec /x {3248F0A8-6813-11D6-A77B-00B0D0150060} /qn
o:\msiexec /x {3248F0A8-6813-11D6-A77B-00B0D0150070} /qn
o:\msiexec /x {3248F0A8-6813-11D6-A77B-00B0D0150080} /qn
o:\msiexec /x {3248F0A8-6813-11D6-A77B-00B0D0150090} /qn
o:\msiexec /x {3248F0A7-6813-11D6-A77B-00B0D0150100} /qn
o:\msiexec /x {3248F0A8-6813-11D6-A77B-00B0D0150110} /qn
o:\msiexec /x {3248F0A8-6813-11D6-A77B-00B0D0150120} /qn
o:\msiexec /x {3248F0A8-6813-11D6-A77B-00B0D0150130} /qn
o:\msiexec /x {3248F0A8-6813-11D6-A77B-00B0D0150140} /qn
rem Remove JRE 1.6.0_x:
o:\msiexec /x {3248F0A8-6813-11D6-A77B-00B0D0160000} /qn
o:\msiexec /x {3248F0A8-6813-11D6-A77B-00B0D0160010} /qn
o:\msiexec /x {3248F0A8-6813-11D6-A77B-00B0D0160020} /qn
o:\msiexec /x {3248F0A8-6813-11D6-A77B-00B0D0160030} /qn
o:\msiexec /x {3248F0A8-6813-11D6-A77B-00B0D0160040} /qn
o:\msiexec /x {3248F0A8-6813-11D6-A77B-00B0D0160050} /qn
o:\msiexec /x {3248F0A8-6813-11D6-A77B-00B0D0160060} /qn
rem Install Latest JRE:
o:\msiexec /I "o:\jre1.6.0_06.msi" /q /LWAMOE %windir%\jre_1606_inst_ok.log ALLUSERS=1 CUSTOM=1 ADDLOCAL=ALL MOZILLA=1 IEXPLORER=1 JAVAUPDATE=0 JU=0 SYSTRAY=0 REBOOT=Suppress AUTOUPDATECHECK=0 WEBSTARTICON=0 EULA=0"
mkdir c:\Windows\Sun\Java\Deployment
del C:\Windows\Sun\Java\Deployment\deployment.config
del C:\Windows\Sun\Java\Deployment\deployment.properties
echo deployment.system.config=file\:C\:/WINDOWS/Sun/Java/Deployment/deployment.properties >> C:\Windows\Sun\Java\Deployment\deployment.config
echo deployment.javaws.autodownload=NEVER >> C:\Windows\Sun\Java\Deployment\deployment.properties
echo deployment.javaws.autodownload.locked= >> C:\Windows\Sun\Java\Deployment\deployment.properties
reg import o:\disable_jre_update.reg
net use o: /DELETE
)
disable_jre_update.reg:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Update\Policy]
"EnableJavaUpdate"=dword:00000000
"NotifyDownload"=dword:00000000
"NotifyInstall"=dword:00000000
"UpdateSchedule"=dword:00000000
"Frequency"=dword:00000000
And i'll admit it can be done a bit neater, but this works fine for me in a GPO, and is quickly usable for future versions. I'm doing it this way, to prevent uninstallation of some JDK's on developers workstations. Otherwise, i could have used the neat vbs solution elsewhere on the forum.If you have any tips or tricks for this beginner to improve this, please let me know :)
0 Comments
[ + ] Show comments
Answers (0)
Please log in to answer
Be the first to answer this question

so that the conversation will remain readable.