PDA

View Full Version : How can I prevent version checking on major upgrades?



craigduffy
07-06-2004, 05:54 PM
When I upgrade my product than contains the main .exe with an older version number, that file is not installed, but the old one is removed. How can I prevent this from happening?

_doog_
07-07-2004, 07:53 AM
thats not too clear...

you try to create a major upgrade that updates an exe (a) with an exe (b) where version(a) > version(b)?
or is version(b) higher than version(a) and it simply does not work?

if it is the first, i would simply highten the version-number to an apropriate value. if it is the latter, i would check the position of the RemoveExistingProducts Action, depending on the position, the behaviour is different (see MSDN)

craigduffy
07-07-2004, 11:03 AM
'RemoveExistingProducts' is between 'InstallValidate and 'InstallInitialize'. According to the help doc, this is as high as it can go. 'FileCost' is where it does version checking, so I would like to RemoveExisting products before that, but that is not possible. All of the existing product is removed, that is fine, but how do I get my current file (older version) to install?

_doog_
07-07-2004, 11:21 AM
- installing an older version does not really make sense, well the Windows Installer is not intended to do that

- you would elevate yourself above a lot of problems if you simply take a resource editor and make the "older" file a "newer" one.

- you could also override the version of your exe-file to simulate a higher version, but i would not recommend that

- setting the REINSTALLMODE to amus should foce a reinstall regardless of versions also help

i still can not see why someone would like to intentionally install an older version over a newer one.

craigduffy
07-07-2004, 11:39 AM
There are many reasons to install an older version, for example if the newer one was develpment version and you want to install an older production version. Also the version of our .exe is different between development and release, and sometimes the old release version is newer than the new one. There's nothing I can do about that.

I do not want to use REINSTALLMODE, because that will reinstall everything, including all merge modules, etc. even if the merge module is older.

Any other ideas?

_doog_
07-07-2004, 11:54 AM
do you say you install an older program-file to newer mm's from development versions? and that should work???
i would kick prgrammers *** to get reasonable versions :)

have you set the migratefeaturesflag with your upgrad entry? if yes, remove that.

another option could be to change the guid of the your files feature, if the removeexistingproducts is that early, it could have the effect you want.

craigduffy
07-07-2004, 12:45 PM
Do you mean change the component code of the .exe? I would then need to change this for every build correct? Are there any other side effects to doing this?

_doog_
07-08-2004, 08:56 AM
well, you would have to change it every time you want to install an older version

the side effect is the same as with the mm's, the exe will be installed even if it would not have to be installed normally, its the overhead

craigduffy
07-08-2004, 10:45 AM
Thanks, I think I will be changing all the component GUIDs that i have shortcuts for anyway, in order to support multiple installations.

Thank you for all your help.