I'll get you some scripts, etc in a bit, what version of LANDesk are you using?
I am leaving for a vacation, will not be back for a week, but if search this community for Java you will find some scripts, some by me, some others too I think. If you are on v9 I might be able to get you some custom defs I have when I get back
version 8.8 SP3
you could try a VB script, a example you can find here: http://www.appdeploy.com/packages/detail.asp?id=923 (the last entry in section "Notes" created 2/24/2011).
Or check the scripts of Dataspike here: http://community.landesk.com/support/message/62492
If you want to use AutoIT take a additional look here: http://www.autoitscript.com/forum/topic/125545-how-to-check-if-java-installed/
I think the script method mentioned might be your best bet.
I am not much of a scripter so I had created Custom Def's that:
- Had a pruduct rule I created to see if the latest version of Java was installed and if so
- Looks for old GUIDs
- If old GUIDs are found, it would call a .cmd file that would call msiexec /x to unintall the old version(s)
It is kinda gludgy, but works well, but also requires a lot of upkeep with each version.
If you cannot get the script to work let me know and I can get you more details on how I do it. If you were on LD9, I could get you the Custom Defs themselves.
Sorry about pulling up this old thread but this is exactly what I was looking for.
Do you still have the def's to remove old Java? I'm on 9.4 and will be moving to 9.5 after we workout some of the issues we are facing.
Which version(s) of Java are you wanting to remove and what version, if any, do you want to keep?
Remove anything older than current version JRE 7 Update 21 or 25
There are two or more scripts posted here on Java Removal. I had taken one created by "DataSpike" and made a Custom Def out of it... you can find it near the end of page two here:Java 7 Update 11
we did run into an issue where systems ended up with no Java what so ever... I think the uninstall script did not have enough wait time in it... not sure....
I will also post my original method, which works well, but relies on calling all of the known GUIDs for uninstalling
Here is a Custom Def for LANDesk 9.0
In the zip file you will find 3 files:
- The Custom Definion
- The Patch Filter
- The .cmd file that will act as the 'patch' to remove old versions of Java
Extract the zip and do the following in this order: (You should always scan for viruses and review the files, especially the .cmd file)
- In your Console, go to Queries and import the file named "PATCH_FILTER - Java is Current.ldms"
- Copy the batch file named "remove_all_old_java_forum.cmd" to your patch folder (ldlogon\patch)
- In the console, go to the patch tool and import the file named "CD-Remove_All_JRE_4_5_6.ldms"
This is how this one works...
It will check the affected platform and products...
** It will then check to see if the "patch filter" query listed above is met, meaning, does the system have JRE 1.7_21 or 1.7_25 installed
If it does, it will then check the system to see if JRE 1.4.x, 1.5.x or 1.6.x is /are installed, if so, it will then call the batch / .cmd file to remove them
** Once the query is imported it can take an hour or more to resolve itself, so if you go to run the query, it may not show any systems... it is best to let it sit for a day and then come back to testing it.
There are one or more vbs scripts on the forum that are more elaborate and you may choose to use them
Thank you for this. This is exactly what I was looking for.
Do you know if this works in 9.5?
Is it easily updated for newer updates? (known GUID and versions of course)
I am working on it, but my scripting skills arnt quite advanced.
Thank you for the LANDesk process though!
I need to update this patch for my use, so when I am done I will add it here.
Which version of Java do you want on your system?
Current 7u45 x86 and x64.
Owe ya a beer now!