Upgrading

Got a problem you cannot solve? Try here.
Naomi
Posts: 7
Joined: Wed Jan 18, 2006 10:57 am

Upgrading

Postby Naomi » Wed Feb 08, 2006 4:53 pm

I have seen some topics about upgrading and uninstall, but could not exactly see the answer I am looking for, so here goes.

My question come down to this: Is an uninstall before doing an upgrade a must?

In other words, would it give any problems with the registry, uninstall, maintenance or some other aspect, if I just skip the uninstall part, and 'just' do the upgrade?

As my question implies I do not want to do an uninstall for an upgrade. First of all, because this can be confusing. Secondly because I want to use certain settings to 'automate' the upgrade procedure.

P.S. While writing this post I did get an idea how I can do what I need to do even with the uninstall, but my question still remains.

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

Postby MichaelNesmith » Wed Feb 08, 2006 5:03 pm

Hi Naomi!

If your product code is the same, and the revision code is different, then this is what Windows Installer "believes":

- You have the same product, but different versions

If your product code is the same, and the revision code is the same, then this is what MSI "thinks":

- You have the exact same product and installation package (regardless of what the packages actually contain)

If your product code is different then as far as MSI is concerned:

- You have totally unrelated setups and packages.

Armed with this brief backgrounder:

1) You should NEVER have a setup package which has an identical package and revision code as another, different package. This will totally confuse Windows Installer and leave files and settings orphaned from both packages.

2) If you have a setup package with different revision codes but the same package code, MSI will not let you install the second copy of the package, before removing the first. The correct thing to do is to uninstall the first copy, and then apply the second copy.

3) If you want to manually control everything, just assign different product codes altogether to your packages, and Windows Installer will not interfere.

In InstallAware, to make things as easy for setup developers as possible, the template scripts are set up the following way:

a) Every time you do a build, the package revision code changes. This is similar to an auto incrementing build number. The assumption is that with every new build you change something, so since your packages are different, they must have a new revision code.

b) The default and project manager generated scripts automatically uninstall old revisions they detect on the system.

Now, you can customize both of the behaviors above. You can disable auto change of the revision code, you can also change the generated setup scripts to relocate the uninstall (for example, move it as part of the main install process so its not confusing), or abolish it altogether.

It all depends on what you're trying to achieve. InstallAware does the best it can to protect you from the innate difficulties of Windows Installer, and the default projects and scripts are set up this way. But based on what you want to achieve, you can customize everything - as long as you are aware of the underlying restrictions imposed by MSI.
Michael Nesmith
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/

Naomi
Posts: 7
Joined: Wed Jan 18, 2006 10:57 am

Postby Naomi » Wed Aug 09, 2006 9:10 am

Because of other priorities, I had to wait a while with continuing the installation. I am having some problems with doing an upgrade and could use some advise.

During the (first) installation I write the type of installation and the target directory in the registry, and I create an ini-file containing some of the settings my application needs (extra settings can be added to this ini-file later).

The registry settings I am using for the upgrade, so the users do not have to go through the entire installation again. The ini file I need so the application will still be running fine after the upgrade.

How can I keep both the registry and the ini-file for an upgrade (without changing them) but still remove them with an uninstall? Or is there another way to do what I need?

I am probably missing something very obvious, but to be honest I am somewhat stuck at this moment...

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

Postby MichaelNesmith » Wed Aug 09, 2006 1:18 pm

For the registry entries: You can mark them as permanent, and then after Apply Uninstall, delete them manually using Delete Registry.

For the INI entries: You can create the INI files directly and then delete them manually after Apply Uninstall using Delete Files Recursive.

There are also other ways to save your setup information, and re-use it later (ex: the Save Feature Selections) in upgraded setups, but it all depends on what your requirements are...
Michael Nesmith

InstallAware

Home of The Next Generation MSI Installer

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

Naomi
Posts: 7
Joined: Wed Jan 18, 2006 10:57 am

Postby Naomi » Thu Aug 10, 2006 3:49 am

MichaelNesmith wrote:For the INI entries: You can create the INI files directly and then delete them manually after Apply Uninstall using Delete Files Recursive.

What exactly do you mean with "create the INI files directly"?

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

Postby MichaelNesmith » Thu Aug 10, 2006 6:28 am

Sorry for being vague. I meant using the Write to Text File command to create them "directly" without going through Windows Installer. Purple commands in your script are Windows Installer commands, and they will be un-done at uninstallation time (unless they have a permanent option, as with the Write Registry command). Black commands are InstallAware's "custom action"s, which execute directly and are not uninstalled by Windows Installer during upgrading. So this method should work for you.
Michael Nesmith

InstallAware

Home of The Next Generation MSI Installer

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

Naomi
Posts: 7
Joined: Wed Jan 18, 2006 10:57 am

Postby Naomi » Thu Aug 10, 2006 6:36 am

Thanks for your help, you helped me get back on the right track :)


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 151 guests