Hello,

I am new to the world of packaging, and am learning as fast as I can while moving forward. I'm using FlexNet AdminStudio 7.5

I have encountered an application that requires a previous version to be uninstalled (not unusual) -- LexisNexis Legal Toolbox 7.1 (old), and LexisNexis Shepards Brief Suite 10.1 (renamed with new version)

I would think the best way to achieve this is by creating a Custom Action in a MST to go through the uninstall process of the previous version -- I've followed the guidelines in this post, but was not successful;

http://itninja.com/question/uninstall?-major-upgrade?

I've tried changing the value for "Install Exec Sequence" to other values for testing (ex. <First Action>, "After RemoveExistingProducts", etc.) -- but none were successful

I've also created a MST transform to customize some of the settings for our environment (just a simple response transform)

I am using AD GPO as a deployment method. Specifying the new version as "an upgrade package" for the old software works as it should -- it uninstalls the old version, and installs the new version.

I am looking for a way to automate this for when a need arises to install the new version outside of a GPO deployment.

Any help, guidance, or suggestions would be greatly appreciated.
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

0
Jdot,

If your previous application, the one you want uninstalled first were installed as MSI's then use the Upgrade table within your new MSI.

Google - Upgrade Table Windows Installer

....

Hope that helps... Sorry for the short answer, i'm slammed at work... i'll check this later and see if i can give you more info....

Answer back with what the orginal installers were - MSI, installscript...?
Answered 01/24/2007 by: gmorgan618
Blue Belt

Please log in to comment
0
gmorgan,

Thanks for the quick response. I did look into the Upgrade table, but was unsure of what data needs to go in the columns.

Currently, the Upgrade table as two rows, with the values of;
--------------
UpgradeCode: {344492BE-565C-4085-85AC-66F77B9B78E9}
VersionMin:
VersionMax: 9.01.0000
Language:
Attributes: 256
Remove:
ActionProperty: UPGRADECT90
-------------
UpgradeCode: {601322C2-96F8-4A35-B520-5324EFB23976}
VersionMin:
VersionMax: 10.1.0000
Language:
Attributes: 257
Remove:
ActionProperty: UPGRADEBCDC
-------------

The deployment of the older version (7.1) was via MSI & AD Group Policy.

To the best of my knowledge, this app needs to have the older version (7.1) completely uninstalled prior to the new version install -- an 'upgrade' (install over existing) will not work...just results in a halted and failed install

Thanks again for the reply
Answered 01/24/2007 by: JdotQ
Senior Purple Belt

Please log in to comment
0
I came across this, which explains the Upgrade table fairly well;

http://msdn2.microsoft.com/en-us/library/aa372379.aspx

Would I just alter one of the previous rows to include the lower 7.1 version as an upgrade? Or would the product of 7.1 need a new row (since it would have a different UpgradeCode)? If I need a separate row/UpgradeCode, where would I find the code for the previous version (7.1)?
Answered 01/24/2007 by: JdotQ
Senior Purple Belt

Please log in to comment
0
If the products you want to be removed (upgrade) during install you would have to have one row per uniq UpgradeCode.
To find out the ProductCode for any MSI just open it with ORCA and fetch the value from the UpgradeCode property in the Property table.
Answered 01/24/2007 by: AngelD
Red Belt

Please log in to comment
0
AngelD, thank you for the reply.

I was able to find the UpgradeCode in the Property table of the older MSI; {133059EC-FD50-44FB-B406-34E866D239D4}

In the new MSI/MST, I created a new row in the Upgrade table, and added the "UpgradeCode". Everything looks good so far.

For the "VersionMin" field, I left it blank (just like the other rows of the Upgrade table)

For the "VersionMax" field, I put "7.1.4.000" -- the other rows have a 10 character version, do I need to have 10 characters? The version of the 'old' software is 7.1.4 - but the "ProductVersion" Property in the Property table is "7.1.4.0"

"Language" field, left blank (just like the other rows of the Upgrade table)

"Attributes" field, I put "258" - does the sequence matter as to what version? Should the oldest version be first -- 256 = v7.1, 257 = v9.01, 258 = v10.1 ?? The current sequence is;

256 = 9.01.0000
257 = 10.1.0000
258 = 7.1.4.000

"Remove" field, left blank (just like other rows of the Upgrade table)

"ActionProperty" field...according to http://msdn2.microsoft.com/en-us/library/aa372379.aspx -

ActionProperty
When the FindRelatedProducts action detects a related product installed on the system, it appends the product code to the property specified in this field. The property specified in this column must be a public property and the package author must add the property to the SecureCustomProperties property. Each row in the Upgrade table must have a unique ActionProperty value. After FindRelatedProducts, the value of this property is a list product codes, separated by semicolons (;), detected on the system.

Since it needs a unique value, do I need to add a value to the "SecureCustomProperties" Property in the Property table - then use that new value in the "ActionProperty" field in the Upgrade table?


Thanks again for all the help and guidance -- I think I'm actually getting the 'hang' of this...
Answered 01/25/2007 by: JdotQ
Senior Purple Belt

Please log in to comment
0
Look up "Updating Properties for an Upgrade" in the SDK.
The property specified in the ActionProperty column of the Upgrade table must be added to the SecureCustomProperties Property.

For each ActionProperty you have add them to the SecureCustomProperties property.
Answered 01/25/2007 by: AngelD
Red Belt

Please log in to comment
0
From what I've read;

http://msdn2.microsoft.com/en-us/library/aa371197.aspx
The RemoveExistingProducts action goes through the product codes listed in the ActionProperty column of the Upgrade table and removes the products in sequence by invoking concurrent installations.

I've named the ActionProperty as "UPGRADECT71" -- same type of format from the other lines of "UPGRADECT90" and "UPGRADEBCDC"

So, it is my understanding that the order does matter -- the oldest version should be first in the list on the Upgrade table? (ex. should get the attribute "256", then alter v9.01 to get "257", and v10.1 to get "258"

I've played around with the order in the Upgrade table, along with the order the ActionProperties are listed in the Properties table, but to no avail.

Going through the install, it still detects there is an older version and the install stops (forcing a manual uninstall)
Answered 01/25/2007 by: JdotQ
Senior Purple Belt

Please log in to comment
0
Hi JdotQ,
you are very close! You got confused somehow by the attribute. Use 4, 260 or 772. Read it up in the SDK.
The attribute enables/disables some special behaviours. It has nothing to do with the sequence of the uninstalls. This is determined only by the position in the table. But, do you really have a case where the sequence of the uninstall matters?
About the version values: Only the first 3 part are recognised.
Hope this clarifies the situation.
Regards, Nick
Answered 01/25/2007 by: nheim
Tenth Degree Black Belt

Please log in to comment
0
ORIGINAL: nheim

Hi JdotQ,
you are very close! You got confused somehow by the attribute. Use 4, 260 or 772. Read it up in the SDK.
The attribute enables/disables some special behaviours. It has nothing to do with the sequence of the uninstalls. This is determined only by the position in the table. But, do you really have a case where the sequence of the uninstall matters?
About the version values: Only the first 3 part are recognised.
Hope this clarifies the situation.
Regards, Nick


nheim,

Thank you for the reply. I tried the three different attributes you mentioned, but none seemed to do the trick -- it still prompts with:

"An old version of the LexisNexis Legal Toolbox has been detected. You must remove old versions of the Toolbox before installing Shepard's Brief Suite."

I searched through the SDK and was unable to find the explanation of the attributes you mentioned. The only thing I could seem to find was the table under the "Attributes" section of this page;

http://msdn2.microsoft.com/en-us/library/aa372379.aspx

The sequence of the uninstall does not matter. In our environment, we only have v7.1 deployed. Within the v10.1 MSI, they have a value set for v9.01 and v10.1. So, the sequence does not matter since we only have one previous version present.

Thanks again for your input -- I hope I am close to solving this issue!

[EDIT]
Just wanted to add that with the attribute of "4", it did continue with the install, but did not remove the older version; exactly as decribed in the linked webpage above;

msidbUpgradeAttributesIgnoreRemoveFailure 4 0x004 Continues installation upon failure to remove a product or application.
Answered 01/26/2007 by: JdotQ
Senior Purple Belt

Please log in to comment
0
Check the Launch Conditions table. Sounds like you have a launch condition that is evaluateing the version detection. Launch conditions must all be TRUE in order to make it proceed.

first off... I wouldn't recommend using nheim's values for the attribute, unless you don't care if the uninstall failed, i think most people do care else why are you trying to remove the product in the first place.

Easiest way to get rid of it... delete all rows in the LaunchConditions table - This is evaluated before the remove of existing products.

The right way, determine which Search is being evaluated and stopping your install. and delete/edit just that one. The launch condition values will contain similar text to what is being displayed for the error message or it should.

For reference - Attribute values are as follows - you add them together to use multiple attributes together..

1 - Migrate features of detect version
2 - Detect only, do not remove -- usually used when blocking older versions from installing over the top of new versions
4 - Ignore Uninstall failures, continue with installation
256 - Detect Versions specified including the VersionMin value
512 - Detect Versions specified including the VersionMax value
1024 - Detect all languages, excluding languages you list in the Language column

so putting 514 as the attribute - would mean - Detect all versions in the range specified, including the VersionMax, BUT don't uninstall(Detect Only)

Another note - and Nheim already said this but MSI's only care about 3 version levels -- so 1.1.1.1 is read and evaluated as 1.1.1, you can put 4 levels, but it's pointless...

Hope this helps
-Grant
Answered 01/29/2007 by: gmorgan618
Blue Belt

Please log in to comment
0
Grant,

Thank you for the reply. The LaunchCondition table does have a row which states the error message;


Condition: OLD_TLBX_FOUND=""
Description: An old version of the LexisNexis® Legal Toolbox has been detected. You must remove old versions of the Toolbox before installing Shepard's® Brief Suite.


Deleting this row allowed for the install to continue, but it did not uninstall the older version. I searched all other tables for the string "OLD_TLBX_FOUND" but did not result in any findings.

Thanks for clearing up the Attribute values -- it makes sense now that some of the numbers are not from the "standard" list in the SDK.
Answered 01/30/2007 by: JdotQ
Senior Purple Belt

Please log in to comment
1
Ok, to use the upgrade table to remove applications - here is the explaination.

First open the package you want to remove. Go to the property table, and record the "UPGRADECODE" and the ProductVersion

Close that package.

Open the package that you want to use to remove the old package.

To to the Property table, Add SecureCustomProperties (if it doesn't exist), then append a value to this entry - OLDVERSIONFOUND -- This can be anything but this is what i use.
Note: if there is already a value there... such as ---- SecureCustomProperties | ISACTIONPROP1
Then use a ; to seperate the values -- so now it looks like this ... SecureCustomProperties | ISACTIONPROP1;OLDVERSIONFOUND

Next go to the Upgrade Table.
The place the UpgradeCode from the package you want to remove in the UPgradeCode column
leave VersionMin blank
Input the ProductVersion in the VersionMax ... only the 3 levels... so 1.1.1 not 1.1.1.9 ...
Leave languages blank -(because you want to remove all of them)
Attribute = 512 - Meaning remove all versions up-to and including the VersionMax value...
Leave Remove blank - this defaults to REMOVE='ALL'
ActionProperty = OLDVERSIONFOUND

That's it! This will give you an idea of how the tables work together, then you can start experimenting with different ATTRIB's...

If you have any problems now, then start looking at the PackageCode(The identifing code for the MSI) and the ProductCode (The identifying code of the Applicaiton - GUID) both of these must be different than the package you are trying to install, and to mention it, should never be the same as any other package.
Answered 01/30/2007 by: gmorgan618
Blue Belt

Please log in to comment
0
gmorgan,

Thank you for the detailed reply. It now works!! This was very close to the steps I was following before, just with some minor tweaks.

The Attribute I tried before was 256, 257, 258 -- I changed it to 512 from your recommendation
The VersionMax I tried before was 7.1.4.000 -- I changed it to 7.1.4 from your recommendation

These two alterations alone did not resolve the issue, as I was still getting the error that an older version was present.

I dropped the row from the LaunchCondition table described in my last post -- and the error did not appear and it went through the uninstall process, followed by installing the newer version.

I was close before, but thank you very much for clarifying things and suggesting settings. It's all starting to come together now [:D]

Best regards.
Answered 01/30/2007 by: JdotQ
Senior Purple Belt

Please log in to comment
0
OOps... i posted something here, but it looks like you got it...
Answered 01/30/2007 by: gmorgan618
Blue Belt

Please log in to comment
0
This is a little late to the game as you've had some great help from the others.

Depending on your deployment tool, I'd recommend using that to pull off the applications before install. Most will let you chain the uninstall to the install that way. If you're stuck with GPO or some such nonsense, you're better off with the upgrade table.
Answered 01/30/2007 by: turbokitty
Sixth Degree Black Belt

Please log in to comment
0
Okay, so I'm trying the same thing and it just does not want to work.

I've tried both with Office 2003 Standard (was trying to get it to remove Office XP Pro -MS Access) and ESRI ArcGIS 9.2.

In both cases, I don't get any errors, it just does NOT remove the old program.

Now I've noticed a little discrepency but not sure if that's the cause. When you're putting in the "ActionProperty" can you put ANYTHING in there, so long as it matches what you put into the "SecureCustomProperties"?

gmorgan618 seems to indicate you need to go into the program you want to UPGRADE and find out it's upgrade code.

In ESRI ArcGIS 9.2 case, I opened up ArcGIS 9.1 and the upgrade code is different than the "uninstall" code found in the registry AND in ESRI's own documentation (for how to do a silent uninstall).

Is that why it's not working?

I've also seen stuff in other forums here that indicate you may have to specify the order (other property or something) to tell it to do the uninstall first?

In Office 2003 case, I put in the removal of OfficeXP and it just didn't do it. I was able to manually run a batch file AFTER the install to remove Access, but would've preferred to do that via the MSI. (it's that we're "upgrading" Office XP Pro to Office 2003 Standard).

Unfortunately I can't do that for ArcGIS because there's like 11 different products that you MAY have to remove prior to installing 9.2. So if I write a batch file to run each msiexec line, and the product is NOT on the pc, the user has to click through an error message like 9 times.
Answered 04/03/2007 by: kjhurni
Orange Belt

Please log in to comment
0
Another thing that I do for some installs is go to the InstallExecuteSequence and look for the sequnce number for REMOVE EXISTING PRODUCT and FILECOST. I change the sequence number for REMVOE EXISTING PRODUCT so that it is smaller than the FILECOST. This way the MSI will run uninstalls first then compare the files in the install against the files already on the computer.

IE

Original:

Action Sequence
FileCost 900
RemoveExistingProduct 1440

After change:

Action Sequence
FileCost 900
RemoveExistingProduct 750
Answered 04/03/2007 by: Cygonz
Senior Yellow Belt

Please log in to comment
0
Thanks.

I found a useful article on the MSDN, but I think this is what's causing the problem:

The MSDN Article http://groups.google.com/group/microsoft.public.platformsdk.msi/browse_thread/thread/f33c08eb58492f85/6f08a92b87327dc8%236f08a92b87327dc8

implies that I should be able to do the "showmsgbox" thingy which works, but it shows NO product codes.

Here's where I am confused:

"old" product (when I open the MSI) reports:
ProductCode {40F8FD5F-4701-48D6-A8FC-1F188007DF38}
ProductVersion: 9.1.722
UpgradeCode: {494B7338-91A8-447B-B089-00BEF54D5C56}

The "new" product (when I open the MSI) reports:

ProductCode: {1F34839E-4826-4B64-B1B3-42E5AE8DEC5A}
ProductVersion: 9.2.1332
UpgradeCode: {018BA370-2717-4E1D-A502-9517B6039E6E}

BUT the "uninstall" (via Add/Remove programs, or searching the registry, ALONG with the vendors own documentation) show that the "GUID" to use for REMOVAL is:
{40F8FD5F-4701-48D6-A8FC-1F188007DF38}

So I'm not sure what I'm supposed to put into the "new" version's UpgradeCode section in the Upgrade Table. I've tried both the "upgradecode" from the old one, along with the productcode for the old one. Neither one appears to work.

The MSDN article seems to indicate that the FindExistingProducts searches the machine for the upgradecode (which it will never find because it does not exist. I searched the registry and only found the productcode of the old one, there was no upgradecode GUID anywhere), and that it will write this information into a property.

It then goes onto to say that the propert yname (the ActionProperty in the upgrade table) is populated with the ProductCode when the "FindRelatedProducts" is run.

But when I had it write the msgbox:
MsgBox("old products="+Property("OLDPRODUCTS"))

All I get is a box that says:
old products =

So it's like it's not finding the old one (and therefore not removing it).

My removeexisting products is set to 1405 for the sequence (still after the filecost as that's like real low, but the MSDN article says that it should be between "installValidate' and 'installInitialize" which means for me, it HAS to be in the 1400 range).
Answered 04/03/2007 by: kjhurni
Orange Belt

Please log in to comment
0
Hi kjhurni,
you can't find the upgrade code of an installed app as a 'normal' GUID in the system, because it's translated into a packed GUID. They are here: HKEY_CLASSES_ROOT\Installer\UpgradeCodes

To uninstall an older app, you have to put it's Upgrade Code into the Upgrade table of the new app.

All the rest, you find on the other thread, you started....

Regards, Nick
Answered 04/04/2007 by: nheim
Tenth Degree Black Belt

Please log in to comment
0
Thanks! Will do!
Answered 04/04/2007 by: kjhurni
Orange Belt

Please log in to comment
Answer this question or Comment on this question for clarity