/build/static/layout/Breadcrumb_cap_w.png

Uninstall? Major Upgrade?

I've searched and searched and can't seem to find enough information to get my package to uninstall previous versions. Please help.

I'm trying to deploy the latest Java to our users, who all have various versions currently installed on their systems. I've downloaded and extracted the latest JAVA msi from the appropriate website. I'm using Flexnet admin studio 7.5.

I've opened up the msi in the editor and from what I gather I need to edit the Upgrade table in "direct editor" and put in the appropriate CLSIDs of the old verstions into the upgrade code field in the table. There's a few wierd things that happen when I try, first of all, as soon as I click into the field is seems to automatically put some sort of CLSID into the field on its own. Then I edit this value and put in the appropriate value and then a red x appears beside the line and I cant edit any more fields in that row. However, if I exit the upgrade table and go to another table, then got back, somehow I end up with 3 rows. Two have a gree plus sign (one of which contains the CLSID I entered) the other is some random one. The third row has a red x and appears to be the original ID that was entered when I first clicked on the row.

At this point I can edit the other fields in the row in question, but frankly I'm not sure what goes into them ( VersionMin, VersionMax, Language, Attributes, Remove, ActionProperty).

I've googled and searched in the forums and can't seem to figure it out fully. I don't have access to the manual and I'm finding the built in "help" to be a little confusing.

All I want is for the install to remove any previous versions of Java before it installs. Can some kind sould walk me through exactly how to do this?

0 Comments   [ + ] Show comments

Answers (24)

Posted by: spartacus 18 years ago
Black Belt
1
I assume we are talking about Java Runtime Environment here, right ? (If not, skip all that follows)

I just took a look at the MSI and transform for J2SE Runtime Environment 5.0 Update 7 (which are unpacked to the %TEMP% folder when you run the downloaded executable).

The upgrade table isn't populated by default and the reason for this might be found in the following extract from the FAQ section on Sun's website :

[font="Courier New"]General Questions


Printable Version

Can I remove older versions of the JRE after installing a newer version?


The latest version of the Java Runtime Environment (JRE) contains updates to previous versions. There might be some applications or applets written and tested against a specific version of the JRE.

It is recommended that you keep older versions of the JRE on your system. If you are running low on disk space, you can uninstall older versions of the JRE.

To remove older versions of JRE, go to Windows Java Runtime Environment uninstallation instructions page.


Whole article can be found at [link]http://www.java.com/en/download/faq/5000070400.xml[/link]

So it looks like the recommendation (from Sun) is to keep the older versions of JRE on and install newer versions side alongside them.

With regards to the problems you are facing modifying the Upgrade Table in AdminStudio, this sounds like general "flakiness" with the editor - you can sometimes see a similar effect when modifying the Property table directly. One approach might be to modify the Upgrade table using ORCA if you are determined to uninstall previous versions of JRE.



Regards,

Spartacus
Posted by: turbokitty 18 years ago
6th Degree Black Belt
1
A few things..
First, you shouldn't be editing the MSI, use a transform. That's probably why you're seeing flakiness, plus it's bad practise to edit a vendor MSI.
When you've opened the transform project, use the Upgrade section of the GUI to add upgrades. Right click on "Upgrade Windows Installer Setup" then choose "Add Major Upgrade Item". It should be clear what to do after that.
If not, post again.
Posted by: xxLucidxx 18 years ago
Senior Yellow Belt
1
Thank you for the quick reply. Yes, I am talking about JRE. I have seen Sun's recommendations about keeping the old versions. We do have some space issues on some of the machines and the only apps we run are based on 1.5 JAVA so I would like to clean out all the old versions. Unfortunetly the instructions on the website show you how to do it via add remove programs which is not what I'm looking for.

Do you have any thoughts on what I should do to get it working using the upgrade table?

My log file has the following info (I think these are the pertinent sections, please let me know if I should post more):

MSI (s) (1C:E0) [11:06:12:171]: Doing action: FindRelatedProducts
Action ended 11:06:12: LaunchConditions. Return value 1.
MSI (s) (1C:E0) [11:06:12:171]: Note: 1: 2262 2: Upgrade 3: -2147287038
MSI (s) (1C:E0) [11:06:12:171]: Transforming table Upgrade.
Action start 11:06:12: FindRelatedProducts.
MSI (s) (1C:E0) [11:06:12:181]: Skipping action: CCPSearch (condition is false)
MSI (s) (1C:E0) [11:06:12:181]: Skipping action: RMCCPSearch (condition is false)
MSI (s) (1C:E0) [11:06:12:181]: Doing action: ValidateProductID
Action ended 11:06:12: FindRelatedProducts. Return value 1.

MSI (s) (1C:E0) [11:06:12:532]: Doing action: RemoveExistingProducts
Action ended 11:06:12: InstallValidate. Return value 1.
MSI (s) (1C:E0) [11:06:12:532]: Note: 1: 2262 2: Upgrade 3: -2147287038
MSI (s) (1C:E0) [11:06:12:532]: Transforming table Upgrade.
Action start 11:06:12: RemoveExistingProducts.
MSI (s) (1C:E0) [11:06:12:532]: Doing action: InstallInitialize
Action ended 11:06:12: RemoveExistingProducts. Return value 1.

Again, any help on this is much appreciated.
Posted by: xxLucidxx 18 years ago
Senior Yellow Belt
1
Turbokitty,

Thanks for your reply. Sorry, I should have been clearer, I am trying to create a transform.

I can't seem to find the "upgrade section" you speak of. Can you tell me how to get there in the gui?

Here are my steps:
- open installshield 11.5 pro - adminstudio edition
- file -> new ->Transform
- wizard opens
- browse to msi , click next
- leave additional transforms section blank, next
- click finish

Then it takes me to the project assistant:
- enter in application info, click next arrow
- accept defaults on installation requirements, click next arrow
- accept defaults on installation architecture, click next arrow
- accept defaults on application files, click next arrow
- accept defaults on application shortcuts, click next arrow
- accept defaults on application registry, click next arrow
- accept defaults on installation interview, click next arrow

Thats all i get from the project assistant, so then I go to the installation designer tab and I get a hierarchy of folders on the left hand side of the screen (install info, application data, system configuration, etc.) and none of these seem to have anything under them about upgrades. I've looked in the menus as well and can't seem to find them.

Sorry, pretty new to this stuff...
Posted by: turbokitty 18 years ago
6th Degree Black Belt
1
I sent you on a wild goose chase, I'm sorry. I thought this would work when I posted:
1) Create a new MSI project
2) Code the upgrade info into it
3) Compile
3) Create/Apply Transform Wizard and use the Java MSI as the base and the new MSI as the differential

But if you try to do that, it crashes out. So it's an Installshield problem. Unfortunately, they add a lot of cool features that don't work all that often.

You can't see the Upgrade postion of the GUI when creating a transform because it only allows you to directly edit the transform. It needs to be in project mode for this to work.

What's your deployment tool?
Posted by: xxLucidxx 18 years ago
Senior Yellow Belt
1
Unfortunetly, we only have active directory at our disposal here. So I wanted to assign it via group policy.
Posted by: turbokitty 18 years ago
6th Degree Black Belt
1
I'm not sure why I didn't think of this before, but just create a custom action in your MST that uninstalls the MSI's.

Use the Custom Action Wizard and choose "Launch another MSI package". It will launch them silently by default.
Posted by: xxLucidxx 18 years ago
Senior Yellow Belt
1
Thanks again for your help. I couldn't quite figure out how to do it with an MSI. Can you elaborate on the steps?

What I did manage to get working was to create an exe custom action. I used msiexec as the exe and passed " /x {clsid} /qb" to it. The problem I'm having is that on my test machine, when I try to uninstall it, the custom action trys to run again. Is there a way I can ensure that it only runs during install, and not uninstall?

Or will doing the uninstall via MSI as you mentioned keep this from happening? If so please walk me through. The wizard gives me three location options (which I'm not sure which to choose). Then it asks me for source and target, which I'm not sure what to put in there (is the source the original install MSI? what do I put into the target field?).

Once again, thanks for your help.
Posted by: turbokitty 18 years ago
6th Degree Black Belt
1
Sure, no problem.

- Start the Custom Action Wizard by right clicking at the top level of the middle pane where it says "Custom Actions"
- Next
- Name is anything
- Comment is anything
- Next
- Type is Launch Another MSI Package
- Location is An Application that is Advertised or Already Installed
- Next
- Source, browse to a copy of the MSI you want to uninstall... it doesn't matter where it is, it just wants to rip the GUID from it
- Target is default (ALLUSERS=[ALLUSERS] REMoVE=ALL
-Next
- Leave Wait for action to finish executing checked on
- Leave Ignore Custom Action Return Code checked off (or on if you want.. doesn't matter)
- In Script Execution will be greyed out
- Execution Scheduling leave as Always Execute
- Next
- Leave the Install UI Sequence alone
- Leave the Install UI Condition alone
- Change the Install Execute Sequence to after "Remove Existing Products"
- Change the Install Execute Sequence to "Not Installed" no quotes


Try that out, let me know
Posted by: xxLucidxx 18 years ago
Senior Yellow Belt
1
Great instructions, I follwed them to the letter (I assumed that you meant change install execute condition when you wrote "Change the Install Execute Sequence to "Not Installed" no quotes")

Unfortunetly I am getting an error during the install:
"internal error 2335 A:\java\jre 5.0 Update 7, c:\windows\installer"

Here's the last chunk of the log (please let me know if you want all of it):

MSI (s) (6C:60) [11:45:58:820]: Doing action: RegisterTypeLibraries
Action ended 11:45:58: InstallODBC. Return value 0.
MSI (s) (6C:60) [11:45:58:820]: Note: 1: 2262 2: TypeLib 3: -2147287038
Action start 11:45:58: RegisterTypeLibraries.
MSI (s) (6C:60) [11:45:58:820]: Doing action: RegisterComPlus
Action ended 11:45:58: RegisterTypeLibraries. Return value 1.
MSI (s) (6C:60) [11:45:58:820]: Note: 1: 2262 2: Complus 3: -2147287038
Action start 11:45:58: RegisterComPlus.
MSI (s) (6C:60) [11:45:58:830]: Doing action: InstallServices
Action ended 11:45:58: RegisterComPlus. Return value 1.
MSI (s) (6C:60) [11:45:58:830]: Note: 1: 2262 2: ServiceInstall 3: -2147287038
Action start 11:45:58: InstallServices.
MSI (s) (6C:60) [11:45:58:830]: Doing action: StartServices
Action ended 11:45:58: InstallServices. Return value 1.
MSI (s) (6C:60) [11:45:58:830]: Note: 1: 2262 2: ServiceControl 3: -2147287038
Action start 11:45:58: StartServices.
MSI (s) (6C:60) [11:45:58:840]: Doing action: SelfRegModules
Action ended 11:45:58: StartServices. Return value 1.
MSI (s) (6C:60) [11:45:58:840]: Note: 1: 2262 2: SelfReg 3: -2147287038
Action start 11:45:58: SelfRegModules.
MSI (s) (6C:60) [11:45:58:840]: Doing action: RegisterUser
Action ended 11:45:58: SelfRegModules. Return value 1.
Action start 11:45:58: RegisterUser.
MSI (s) (6C:60) [11:45:58:840]: Doing action: RegisterProduct
Action ended 11:45:58: RegisterUser. Return value 0.
Action start 11:45:58: RegisterProduct.
MSI (s) (6C:60) [11:45:58:850]: Doing action: PublishComponents
Action ended 11:45:58: RegisterProduct. Return value 1.
MSI (s) (6C:60) [11:45:58:850]: Note: 1: 2262 2: PublishComponent 3: -2147287038
Action start 11:45:58: PublishComponents.
MSI (s) (6C:60) [11:45:58:850]: Doing action: MsiPublishAssemblies
Action ended 11:45:58: PublishComponents. Return value 1.
Action start 11:45:58: MsiPublishAssemblies.
MSI (s) (6C:60) [11:45:58:860]: Doing action: PublishFeatures
Action ended 11:45:58: MsiPublishAssemblies. Return value 1.
Action start 11:45:58: PublishFeatures.
MSI (s) (6C:60) [11:45:58:860]: Doing action: PublishProduct
Action ended 11:45:58: PublishFeatures. Return value 1.
Action start 11:45:58: PublishProduct.
MSI (s) (6C:60) [11:45:58:870]: Note: 1: 2335 2: A:\Java\JRE 5.0 Update 7\ 3: C:\WINDOWS\Installer\
DEBUG: Error 2335: Path: A:\Java\JRE 5.0 Update 7\ is not a parent of C:\WINDOWS\Installer\
MSI (s) (6C:60) [13:15:20:900]: Product: Java 2 Runtime Environment, SE v1.4.2_12 -- Internal Error 2335. A:\Java\JRE 5.0 Update 7\, C:\WINDOWS\Installer\

MSI (c) (E8:FC) [11:45:58:880]: Font created. Charset: Req=0, Ret=0, Font: Req=MS Shell Dlg, Ret=MS Shell Dlg

MSI (s) (6C:60) [13:15:20:960]: Machine policy value 'DisableRollback' is 0
MSI (s) (6C:60) [13:15:20:960]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\Rollback\Scripts 3: 2
MSI (s) (6C:60) [13:15:20:960]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\Rollback\Scripts 3: 2
MSI (s) (6C:60) [13:15:20:960]: Calling SRSetRestorePoint API. dwRestorePtType: 13, dwEventType: 103, llSequenceNumber: 345, szDescription: "".
MSI (s) (6C:60) [13:15:21:200]: The call to SRSetRestorePoint API succeeded. Returned status: 0.
MSI (s) (6C:60) [13:15:21:200]: Unlocking Server
Action ended 13:15:20: PublishProduct. Return value 3.
Action ended 13:15:21: INSTALL. Return value 3.
MSI (s) (6C:60) [13:15:21:230]: Attempting to delete file C:\WINDOWS\Installer\f0b31.mst
MSI (s) (6C:60) [13:15:21:230]: Unable to delete the file. LastError = 32
MSI (s) (6C:28) [13:15:21:291]: Transforming table InstallExecuteSequence.

Action ended 13:15:21: RemOldJava. Return value 3.
Action ended 13:15:21: INSTALL. Return value 3.
MSI (s) (6C:28) [13:15:21:301]: Note: 1: 1708
MSI (s) (6C:28) [13:15:21:301]: Product: J2SE Runtime Environment 5.0 Update 7 -- Installation operation failed.

MSI (s) (6C:28) [13:15:21:301]: Attempting to delete file C:\WINDOWS\Installer\f0b2e.mst
MSI (s) (6C:28) [13:15:21:301]: Unable to delete the file. LastError = 32
MSI (s) (6C:28) [13:15:21:311]: Cleaning up uninstalled install packages, if any exist
MSI (s) (6C:28) [13:15:21:311]: MainEngineThread is returning 1603
MSI (s) (6C:94) [13:15:21:371]: Destroying RemoteAPI object.
MSI (s) (6C:D0) [13:15:21:441]: Custom Action Manager thread ending.
=== Logging stopped: 21/06/2006 13:15:21 ===
MSI (c) (E8:04) [13:15:21:441]: Decrementing counter to disable shutdown. If counter >= 0, shutdown will be denied. Counter after decrement: -1
MSI (c) (E8:04) [13:15:21:441]: MainEngineThread is returning 1603
=== Verbose logging stopped: 21/06/2006 13:15:21 ===


Any thoughts on what's happenining?
Posted by: turbokitty 18 years ago
6th Degree Black Belt
1
Hi, I've looked into this further (and tested it) and it seems that you can't do this silently. When I've used this in the past, it was for desktop support, using the UI sequence. You'd have to use the UI sequence for the custom action for this to work as MSIEXEC won't allow enough processes to run to do two installs at the same time silently.

You'll have to use your deployment tool to call the uninstall if the major upgrade path isn't working for you. Can't you remove the package from policy before assigning the new one or were they installed manually?

This is a dilly of a pickle. GPO really blows. How about a login script?
Posted by: xxLucidxx 18 years ago
Senior Yellow Belt
1
Alas the old versions were installed manually. This whole exercise was to remove all the previous versions and then bring java under management.

Any thoughts on attempting to do it via major upgrade? Can you walk me through how to try to make that happen? I was just really using trial and error.

Otherwise, it sounds like login scrips will be the way to go... I'll be happy when I get this environment under control.
Posted by: MSIMaker 18 years ago
2nd Degree Black Belt
1
ORIGINAL: xxLucidxx

Alas the old versions were installed manually. This whole exercise was to remove all the previous versions and then bring java under management.

Any thoughts on attempting to do it via major upgrade? Can you walk me through how to try to make that happen? I was just really using trial and error.

Otherwise, it sounds like login scrips will be the way to go... I'll be happy when I get this environment under control.




You do realise that that you can run them side by side don't you? You do not have to remove the old version as multiple Java versions can sit on one box without an issue.

The only thing you may need to do is to change a registry key that sets the version for IE to use. All other apps will use the version they are written for.
Posted by: turbokitty 18 years ago
6th Degree Black Belt
1
I don't know about that.. I've seen multiple Java's cause lots of issues with apps that weren't well written.

xxLucidxx, send me a private message through the board and I'll send you a training document that will help you out with upgrades and other issues.
Posted by: MSIMaker 18 years ago
2nd Degree Black Belt
1
ORIGINAL: turbokitty

I don't know about that.. I've seen multiple Java's cause lots of issues with apps that weren't well written.

xxLucidxx, send me a private message through the board and I'll send you a training document that will help you out with upgrades and other issues.


I have too Turbo....The Avaya Suite is one in particular.....it needs its own Java version or it won't work properly.

Most Java apps though will actually look for their Java root and work ok....Some badly written ones will of course be a headache.
Posted by: xxLucidxx 18 years ago
Senior Yellow Belt
1
MSI,

I have read you can have multiple versions, and as turbo and you have both noticed, I have ran into the odd problem with some poorly written apps.

I'm still open to suggestions from anyone on how to get this sucker done. But I'm guessing the easiest thing to do is use login scripts.

There is one question however, I'm thinking what I will do is deploy the Java 1.5 via GPO one day and then augment the login scripts to remove the older versions for the next day. Any thoughts on the possiblilities that uninstalling and old version might corrupt the newer version?

Also, if anyone can recommend a good CHEAP app to replace GPO for this stuff please let me know, the issue here is that we are a small shop so I won't have any luck getting the powers that be to fork over alot of cash for the standard solutions.

Thanks for the help turbo, msi, and anyone else who wants to get into the frey.
Posted by: MSIMaker 18 years ago
2nd Degree Black Belt
1
xxLucidxx

You could always make a "Clean Out" msi nad deploy it.

Take your original Java msi and copy it to another name. Open the wsi or msi and then change all of the files and registry keys from Install to Remove.

When it installs it will remove all of the old keys it originally installed.

It won't remove the system Installer keys and they will be orphaned but at least you have gotten rid of the old version.
Posted by: xxLucidxx 18 years ago
Senior Yellow Belt
1
Thanks MSI,

I did some testing on using a login script and it seems to work okay so I will probably go with that as it would be a bit cleaner.

Any suggestions on a cheap app that is better than GPO for managing software deployments? I'd love to get something better in that isn't cost prohibitive.
Posted by: nheim 18 years ago
10th Degree Black Belt
1
Hi folks,
the upgrade of the Java MSI's fails due to two reasons:
First, Sun doesn't populate the upgrade table of all MSI's so far.
Second, Sun doesn't respect the guidelines to populate the 'ProductVersion' property! They do it like this: 1.4.2_01
This mixes up the version value in the registry thoroughly. But unfortunately this one is being checked during an upgrade.

Excerpt from the Installer SDK docu:
----
ProductVersion property
The format of the string is as follows:
major.minor.build
The first field is the major version and has a maximum value of 255. The second field is the minor version and has a maximum value of 255. The third field is called the build version or the update version and has a maximum value of 65,535.
------

Example from 1.4.2.01:
[HKEY_CLASSES_ROOT\Installer\Products\{PackedGUID}]
"ProductName"="Java 2 Runtime Environment, SE v1.4.2_01"
"Version"=dword:81040000

This resolves to 129.4.0!

With a line like this:
{7148F0A7-6813-11D6-A77B-00B0D0142010} 0.0.0 130.0.0 4 UPGRADE2
the uninstall of the version 1.4.2.01 should work.
Because Sun puts a new UpgradeCode on each new release, the version isn't that important in the upgrade process.
For all the versions from 1.4.0 upwards this should work likewise.
Hope this helps.
Regards, Nick
Posted by: TWGTech 17 years ago
Yellow Belt
1
I think that the real issue with GPO is that it is not controlling your initial install. It is really a great deployment tool (so long as companies actually code to the .MSI guidelines, but that's not GPO's fault, either).

You can deploy your current version with GPO. This will bring all systems under policy control. Then you can add an upgrade package to the current policy, and tell it to uninstall the original version first.
Posted by: nheim 17 years ago
10th Degree Black Belt
1
Hi David,
please don't open up threads that are this old, if there is no good reason for that.
GPO install was never a topic on this hole tread, so your post adds nothing more than confusion to it.
Regards, Nick
Posted by: TWGTech 17 years ago
Yellow Belt
1
While GPO was never the initial subject, xxLucidxx did ask about replacements for it, and stated that he was having issues with it. I simply explained that there was a way to bring unmanaged installs under control, and that by doing so, it eased the pain of a stated issue - "Unfortunetly, we only have active directory at our disposal here. So I wanted to assign it via group policy."

I don't see how that adds confusion, but rather clears up how to leverage the capabilities of the deployment tool he has. I guess "good reason" is in the eye of the reader.

Apologies for that. Perhaps I need to send future posts to you for prior approval.
Posted by: nheim 17 years ago
10th Degree Black Belt
1
Hi David,
didn't want to offend you at all.
But answering a question, that is more than a year old, seems to come a little late to solve the actual problem.
Regards, Nick
Posted by: TWGTech 17 years ago
Yellow Belt
1
Your first response was a bit brusque, which elicited my response.

I found this particular post by searching for an issue I was having, not by browsing the forums. The data I found here, while not relevant to my issue, is still valid information. I do not think that a timestamp relegates anything into the "useless" pile in our profession.

I often find resolutions for issues that I am currently having in posts that are several years old. Simply because I did not experience the same issue at the same time does not mean the resolution is moot, or that relevant data cannot be added.

I know that many of us are being told to do more with less, and that sometimes means dusting off the old toolbox and resurrecting items that were once thought to be defunct. This in and of itself makes old data useful.

That being said, I will not post to this thread anymore, and I will endeavor to be more aware of my postings in the future.
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