/build/static/layout/Breadcrumb_cap_w.png

JRE package that uninstalls previous versions

I have a task from my management. I need to make a package for 1.4.2_19 installation that removes all previous versions (or another versions at all) of JRE. I can do it only via .msi and Orca with transforms file (.mst). Not allowed to use any scripts or manual actions. This is my manager's requirement. After deploying of this package only one version of JRE should be in registry and in uninstall programms menu. Also it should be only one version in Programm files. Package should be assigned via group policy. Actually I've never made packages before and to not ask this question I've tried to search the answer in Internet and in this forum too. At the moment I do not know is this possible to complete the task. I found that some people tried to do it but has the same result as me. What have I done? Please take a look.
I've got original .msi. Then opened it with Orca and created a new transform. Then I've set several options.

Under Property:
AUTOUPDATECHECK 0
IEXPLORER 1
JAVAUPDATE 0
MOZILLA 1
WEBSTARTICON 0
SYSTRAY 0

To disable JQS service:
Added a row to InstallExecuteSequence table with values
ForceUninstallJQS NOT Installed 3184
Added a row to CustomAction table with values:
ForceUninstallJQS 3089 regutils.dll MSIUninstallJQS

To remove Java Start desktop icon and start menu group I have removed two keys under InstallExecuteSequence:
CreateJavaWSDesktopIcon
CreateJavaWSStartMenuIcon

Then I've made customizations that as I thought may uninstall previous versions
Under Property:
SecureCustomProperties INSTALLINTL;JRE400;JRE401;JRE402;JRE403;JRE404;JRE405;JRE406;JRE407;JRE408;JRE409;JRE410;JRE411;JRE412;JRE413;JRE414;JRE415;JRE416;JRE417;JRE418
Under Upgrade I've changed UpgradeCode, Language, Attribute, ActionProperty
{7148F0A8-6813-11D6-A77B-00B0D0142000} 1033 256 JRE400
{7148F0A8-6813-11D6-A77B-00B0D0142010} 1033 256 JRE401
{7148F0A8-6813-11D6-A77B-00B0D0142020} 1033 256 JRE402
{7148F0A8-6813-11D6-A77B-00B0D0142030} 1033 256 JRE403
{7148F0A8-6813-11D6-A77B-00B0D0142040} 1033 256 JRE404
{7148F0A8-6813-11D6-A77B-00B0D0142050} 1033 256 JRE405
{7148F0A8-6813-11D6-A77B-00B0D0142060} 1033 256 JRE406
{7148F0A8-6813-11D6-A77B-00B0D0142070} 1033 256 JRE407
{7148F0A8-6813-11D6-A77B-00B0D0142080} 1033 256 JRE408
{7148F0A8-6813-11D6-A77B-00B0D0142090} 1033 256 JRE409
{7148F0A8-6813-11D6-A77B-00B0D0142100} 1033 256 JRE410
{7148F0A8-6813-11D6-A77B-00B0D0142110} 1033 256 JRE411
{7148F0A8-6813-11D6-A77B-00B0D0142120} 1033 256 JRE412
{7148F0A8-6813-11D6-A77B-00B0D0142130} 1033 256 JRE413
{7148F0A8-6813-11D6-A77B-00B0D0142140} 1033 256 JRE414
{7148F0A8-6813-11D6-A77B-00B0D0142150} 1033 256 JRE415
{7148F0A8-6813-11D6-A77B-00B0D0142160} 1033 256 JRE416
{7148F0A8-6813-11D6-A77B-00B0D0142170} 1033 256 JRE417
{7148F0A8-6813-11D6-A77B-00B0D0142180} 1033 256 JRE418

Also I tried to change Attribute to 1, 4 etc; changed VersionMin, VersionMax and much more different variations. Every time I had the same result. The new version of JRE was installed (java -version did correct answer), the version of JRE was correct in registry but all previous versions still stayed in uninstall menu, registry and programm files. I underline the fact that I cannot delete it via script or manually. Dear colleagues please advise how to complete this task. If it's not possible do you know may I have (and where) an official information that it cannot be done? Thank you beforehand!

0 Comments   [ + ] Show comments

Answers (10)

Posted by: MSIPackager 13 years ago
3rd Degree Black Belt
0
With the enforced no scripts rule... does that include not using a script in an internal MSI custom action?

As long as you know all versions in the estate currently and have the silent uninstall strings this is probably the route I would use.

I'll keep my thoughts on your manager to myself ;)
Posted by: xdream 13 years ago
Senior Yellow Belt
0
does that include not using a script in an internal MSI custom action?
Actually I suppose yes, but I did not tried to do it yet cause I'm not professional packager. Please advise me how to do it. If it works I will try to insist on it.
Posted by: anonymous_9363 13 years ago
Red Belt
0
It may not be the most "politically correct" solution but arguably the most efficient way would be to use the RemoveFile and RemoveRegistry tables remove the entire folder structure from the "root" (normally %ProgramFiles%\JavaSoft), registry data (HKLM\Software\JavaSoft) and the installation registry data. The latter branches from HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall, but you'll need to get the ProductCodes for the various versions which may be installed in your estate.

Rob, I suspect that if the manager has made such an edict (and the "Packager's Baseball Bat" thought came to my mind, too), he'll have the nous to check for script in CAs.
Posted by: MSIPackager 13 years ago
3rd Degree Black Belt
0
As Ian mentioned you can pull the information from the HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall branch (of machines with it installed on) to get the uninstall strings for all the relevant versions.

Then I'd prove these silent uninstall strings work manually in a suitable test environment.

Once you are happy with the you need to wrap up all the uninstall strings in a scrips (wise / vb whatever you like) with the appropriate error checking and logging - then test this script manually.

Once you've got that far you can call the script as a custom action in your MSI - we'll go into that more if you go for this solution. You could then remove all of the SecureCustomProperties you added, along with the Upgrade table lines.

Ian has offered another solution which you could go for but it would be preferable IMO to use the vendor uninstall command lines before you finally install your required version.

Hope this helps.

Cheers,
Rob.
Posted by: xdream 13 years ago
Senior Yellow Belt
0
Dear sirs, thanks for your answers! I think what's more appropriate for me - registry cleaning or adding script to .msi. I suppose that script usage will not be allowed by management. I have one more little question. What for does Upgrade table exist in .msi? My manager believes that this option may uninstall software (especially JRE). But I have tested both types of installations and I've got the same results. So I think that adding any strings in Upgrade table is useless. Please answer me. Thanks!
Posted by: anonymous_9363 13 years ago
Red Belt
0
Please answer meIf you're going to lead with the chin...try this
Posted by: xdream 13 years ago
Senior Yellow Belt
0
Good answer. I just wanted someone said me "Yes, I know that it works, but you better RTFM". By the way I always search the answer before I ask real people.
Posted by: anonymous_9363 13 years ago
Red Belt
0
Then perhaps you need to think about re-phrasing questions like "What for does Upgrade table exist in .msi?" since, if you have read up on the subject, that question would already have been answered.

Have you tried moving the RemoveExistingProducts action to earlier in the sequence, BTW?
Posted by: MSIPackager 13 years ago
3rd Degree Black Belt
0
haha lead with the chin I like it.

The upgrade table can indeed be used to uninstall exising MSI's - but as Ian says you should also move the RemoveExistingProducts action further up the sequence in order to do it neatly.

Didn't go into this method too much since you are new to packaging and I think the scripted CA solution would be most straight forward for you.

If you go for the Upgrade table, just concentrate on getting 1 JRE to uninstall properly first - once you've cracked that you can start adding the others in...

Cheers,
Rob.
Posted by: xdream 13 years ago
Senior Yellow Belt
0
VBScab
MSIPackager
thanks for posts. As I said before I'm not a professional in packaging and glad to hear any kind of advice. At the moment I've tried to move RemoveExistingProducts up and down and have no success. Now I understand that Upgrade table method is quite difficult to understand in a short time
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ