Deleting old versions during upgrade

Got a problem you cannot solve? Try here.
gmayne
Posts: 12
Joined: Mon Sep 04, 2006 9:49 am
Location: UK

Deleting old versions during upgrade

Postby gmayne » Wed Sep 06, 2006 4:21 am

I have a new product that replaces two old products. In InstallShield I could specify the GUID's of the old products and they would be removed during the installation of the new product.

The nearest equivalent I can find in InstallAware is "(Un)Install MSI Setup". I have tried this but it is not working. The settings seem simple enough. Here is an extract of my script:

[DEFINE REGION: Perform First Time or Maintenance Installation]
Comment: Install/Re-Install product
[OFFLINE CONTENT]
Install/Remove MSI Package {8DDB11F4-4E0C-449C-B138-B2AF07881679}[REMOVE=ALL]
Install/Remove MSI Package {67943C1B-6E3A-4AB7-85B8-08FF8F4744D3}[REMOVE=ALL]
Install Files C:\\A Nomad\\4.0.x\\NOMAD - Configure\\deu\\Configure.deu to $TARGETDIR$
Install Files C:\\A Nomad\\4.0.x\\NOMAD - Configure\\esp\\Configure.esn to $TARGETDIR$
Install Files C:\\A Nomad\\4.0.x\\NOMAD - Configure\\esp\\Configure.esp to $TARGETDIR$

The GUID's are correct (InstallShield works ok with them). I have logged the results and attached one of the log files.

Can anybody help?

File Attached:

log1.txt

MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Postby MichaelNesmith » Wed Sep 06, 2006 6:04 am

Oh, it should absolutely work. This is how InstallAware removes older versions of your InstallAware setups as well - one of the most basic product functionality.

If I were you, I'd move the code to the top, inside the prereq block, for cleaner organization (there, you can also see the pre-built InstallAware code that uses this same command).
Michael Nesmith
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/

Tinus
Posts: 207
Joined: Tue Jun 20, 2006 8:42 am
Location: Germany

Postby Tinus » Wed Sep 06, 2006 8:59 am

gmaye:

Are you sure about your GUIDs?
InstallShield Express (which I used before IA) keeps the upgrade code and changes the product code for any new version.
Martin Rothschink
InstallAware MVP

AxoNet Software GmbH
http://www.axonet.de/products/other-pro ... stallaware

seanmckenna
Posts: 46
Joined: Tue Aug 22, 2006 9:16 am
Location: NorthEast, USA
Contact:

Postby seanmckenna » Wed Sep 06, 2006 9:26 am

I had the same problem. With my InstallShield setups, I uninstalled old versions based on the upgrade code (which didn't change), and I had to create a new product code for each new installer.

In InstallAware, I am doing just the opposite (keeping product code the same). I am making my users do a manual uninstall of versions before I switched to InstallAware.

gmayne
Posts: 12
Joined: Mon Sep 04, 2006 9:49 am
Location: UK

Postby gmayne » Wed Sep 06, 2006 9:53 am

Thanks Tinus, It had me confused to start with, but I've checked that it's the right GUID.

I've tried moving my statements to the top of the Instapp Pre-Req section, before the if statement:

[DEFINE REGION: Install Application Pre-Requisites]
Comment: Install setup pre-requisites
Install/Remove MSI Package {8DDB11F4-4E0C-449C-B138-B2AF07881679}[REMOVE=ALL]
Install/Remove MSI Package {67943C1B-6E3A-4AB7-85B8-08FF8F4744D3}[REMOVE=ALL]
if Variable PREREQ not Equals FALSE

I've trapped the returned error and I get:
"This action is only valid for products that are currently installed"

I've found the copied msi for one of the apps in the Windows\\Installer folder and using ORCA I can see the GUID:
{8DDB11F4-4E0C-449C-B138-B2AF07881679}

The filename of the copied msi (adc1f1.msi) doesn't seem to have any relation to the original msi - is this just a random string ?

Tinus
Posts: 207
Joined: Tue Jun 20, 2006 8:42 am
Location: Germany

Postby Tinus » Wed Sep 06, 2006 10:07 am

Please try to verify that the product is really installed with this GUID:

Can you uninstall from control panel? Maybe it was not installed for all users.

Can you uninstall from command line with msiexec? (msiexec /x GUID).
Martin Rothschink
InstallAware MVP

AxoNet Software GmbH
http://www.axonet.de/products/other-pro ... stallaware

gmayne
Posts: 12
Joined: Mon Sep 04, 2006 9:49 am
Location: UK

Postby gmayne » Wed Sep 06, 2006 10:08 am

I've just used ORCA on the copied msi for the InstallAware generated install. I can see the product code in the msi matches my IA project. I can see an upgrade code in the msi - where does that come from? It doesn't match the revison code in the project.

I wasn't expecting the underlying structure of the msi to be different between IS and IA (I thought they were just being loose with their terms in the user interface). Call me naive but I thought there would be some kind of standardisation. I find it hard to accept that if I buy IA I wont be able to provide a friendly upgrade path for my customers who had previous installs performed by IS.

gmayne
Posts: 12
Joined: Mon Sep 04, 2006 9:49 am
Location: UK

Postby gmayne » Wed Sep 06, 2006 10:17 am

I'm out of step with the posts. Thanks Tinus. Just tried uninstalling with msiexec and it failed too. Tried uninstalling with the IS product code (the one that changes between builds) and it worked!!!

Look like IS are the deviant ones.

Tinus
Posts: 207
Joined: Tue Jun 20, 2006 8:42 am
Location: Germany

Postby Tinus » Wed Sep 06, 2006 10:26 am

I've done it this way:

I copied the Product Code from my last InstallShield setup into my IA6 setup as Product Code.
I have not changed the Application Pre-Requisites region, so IA6 automatically uninstalls this product code.

This worked as expected. The only drawback of this approach is, that any previous version
(with a different Product Code but same InstallShield Update Code) is not uninstalled.

On my TODO list is a plan for a plugin that will implement the InstallShield update method (if possible).
But currently I have no free resources for this.
Martin Rothschink
InstallAware MVP

AxoNet Software GmbH
http://www.axonet.de/products/other-pro ... stallaware

gmayne
Posts: 12
Joined: Mon Sep 04, 2006 9:49 am
Location: UK

Postby gmayne » Fri Sep 08, 2006 11:38 am

What does work, but is a pain, is to fill in the upgrade table of the msi file with the upgrade codes using Orca.

Question for the InstallAware team - why is there no support for the msi upgrade table in IA?

MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Postby MichaelNesmith » Fri Sep 08, 2006 3:28 pm

You don't need to manually populate ANY database table in InstallAware - it takes care of all of it for you. If you want to uninstall old versions built using other products, use the (Un)Install MSI Setup command. If you want to uninstall your old InstallAware built setups, this is fully automatic, InstallAware manages it all for you. Your difficulties with the InstallShield versions are caused by InstallShield not being clear on what your package GUID really is, and you'd have the same problem if you wanted to populate the upgrade table :)
Michael Nesmith

InstallAware

Home of The Next Generation MSI Installer

Get your free copy today - http://www.installaware.com/

gmayne
Posts: 12
Joined: Mon Sep 04, 2006 9:49 am
Location: UK

Postby gmayne » Sat Sep 09, 2006 2:52 am

The problem is that early versions of InstallShield got round an msi issue by forcing the user to change the product code with every build. Only the upgrade code remained constant. That means that every version of a given product has a different product code.

You may well say that's InstallShield's problem, but that still doesn't address the issue that according to microsoft the upgrade table is the correct way for removing old versions.

The simple reality is that the upgrade table works - I have tried it for myself. The upgrade table is an important part of msi and I think IA would be a more complete product if it supported it.

MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Postby MichaelNesmith » Sat Sep 09, 2006 7:11 am

I think you're still confused. This has nothing to do with supporting the upgrade code table. InstallAware already supports the upgrade code table, in fact without this table, you would not be able to build patches for your products, which is something InstallAware can do.

What you're really asking for is a new script command that detects a product using its upgrade code, and then returns its product code if the upgrade code is found. Then you would be able to properly uninstall it using the product code and the existing (Un)Install MSI Setup command.

Of course, what InstallShield did goes completely against Microsoft standards - just read the Platform SDK. Changing the product code with every build is ridiculous. The correct code that should be changed is the revision code, which is what InstallAware does. And apparently they have corrected this mistake in their newer versions, probably because of complaints they received and issues that were caused by this.

Unfortunately, we cannot fix InstallShield's bugs for them, especially bugs they have already fixed for themselves :lol: You could try to write a plug-in that matches the functionality described above using the Platform SDK and the API functions exposed since you're comfortable with MSI internals; this would be the cleanest solution for your problems. If you do, please post your work here, so other developers can benefit from it.
Michael Nesmith

InstallAware

Home of The Next Generation MSI Installer

Get your free copy today - http://www.installaware.com/

Tinus
Posts: 207
Joined: Tue Jun 20, 2006 8:42 am
Location: Germany

Postby Tinus » Wed Sep 13, 2006 9:10 am

I have created a plug-in for this now.

See http://www.installaware.com/forum/viewtopic.php?t=1237
Martin Rothschink
InstallAware MVP

AxoNet Software GmbH
http://www.axonet.de/products/other-pro ... stallaware


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 47 guests