How to uninstall Java

(imported topic written by johnclin)

Hello,

I am completely new to BigFix but ready to learn.

My first request is about creating a task (or should it be a fixlet) to completely uninstall Java 7 or 6, from a Win7 box. Can someone assist? I think having the relevance and action would be helpful.

Also, if you can include whatever registry code, that will help me know which things I need to replace on my end, since sometimes the code says to replace “displayname” or such and I don’t know what I would replace it with without seeing another example.

Thanks.

(imported comment written by MattPeterson)

John,

Here is what I’ve used in the past. This will search the registry for uninstall keys with a display name containing Java. it will remove 32 and 64 bit versions, will work for Win xp or 7. A task and a fixlet are basically the same thing, exept for the default behavior of “sucess criteria”. You should set it to “the action applicability evaluates to false”.

RELEVANCE:

exists key whose (value “DisplayName” of it as string contains “Java”) of key “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall” of registry or exists key whose (value “DisplayName” of it as string contains “Java”) of key “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall” of native registry

ACTION SCRIPT:

delete __appendfile

appendfile @ECHO OFF

appendfile {concatenation “%0d%0a” of (“start /w msiexec /x” & name of it & " /qn REBOOT=ReallySuppress") of (keys whose (value “DisplayName” of it as string contains “Java”) of key “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall” of x32 registry)}

delete uninstallJRE.bat

copy __appendfile uninstallJRE.bat

wait “{pathname of client folder of site “BESSupport”}\RunQuiet.exe” uninstallJRE.bat

action may require restart

//x64

delete __appendfile

appendfile @ECHO OFF

appendfile {concatenation “%0d%0a” of (“start /w msiexec /x” & name of it & " /qn REBOOT=ReallySuppress") of (keys whose (value “DisplayName” of it as string contains “Java”) of key “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall” of native registry)}

delete uninstallJRE64.bat

copy __appendfile uninstallJRE64.bat

wait “{pathname of client folder of site “BESSupport”}\RunQuiet.exe” uninstallJRE64.bat

action may require restart

Good luck.

(imported comment written by johnclin)

Thanks, this worked great!

Hi,

can you share the relevance for particular Java version has been un-install, like Java 7 updates 45 (or) 75.

Thanks,
Nagarajan.