Scenario: SomeMSI.msi with version 2.0.1.0 has already been installed on local
computer.
Purpose: When a user runs SomeMSI.msi with version 2.0.2.0, the bits of 2.0.1.0
should be upgraded to 2.0.2.0
Problems: When the newer version of the msi is launched by "msiexec /I
SomeMSI.msi REINSTALL=ALL REINSTALLMODE=vomus", an error occurred complaining
that the SomeMSI.msi with version 2.0.1.0 cannot be found.
The .wxs file is looked like:
<Wix xmlns='http://schemas.microsoft.com/wix/2003/01/wi'>
<Product Id='E3B9C03E-666F-4fd4-A878-575D2D3ACF7D' Name='SomeMSI'
UpgradeCode='1C4BACC6-959A-47bf-9F62-BEFE9689F0EF' Language='1033'
Version='$(env._BLDVERMAJOR).$(env._BLDVERMINOR).$(env._BLDNUMMAJOR)'
Manufacturer='Microsoft Corporation'>
<Package Id='????????-????-????-????-????????????' Description='' Comments=''
Manufacturer='Microsoft Corporation' Compressed='yes' />
......
<Upgrade Id="1C4BACC6-959A-47bf-9F62-BEFE9689F0EF">
<UpgradeVersion OnlyDetect='yes' Property='NEWER_VER_FOUND'
IncludeMinimum='yes'
Minimum='$(env._BLDVERMAJOR).$(env._BLDVERMINOR).$(env._BLDNUMMAJOR)' />
<UpgradeVersion OnlyDetect='yes' Property='OLDER_VER_FOUND'
IncludeMinimum='yes' Minimum='2.0.0' IncludeMaximum='no'
Maximum='$(env._BLDVERMAJOR).$(env._BLDVERMINOR).$(env._BLDNUMMAJOR)'/>
</Upgrade>
......
<InstallExecuteSequence>
......
<RemoveExistingProducts
After="InstallValidate">OLDER_VER_FOUND</RemoveExistingProducts>
<Custom Action='AlreadyNewestSE'
After='FindRelatedProducts'>NEWER_VER_FOUND</Custom>
......
</InstallExecuteSequence>
<CustomAction Id='AlreadyNewestSE' Error='Spec Explorer 2 has already been
updated.'/>
......
</Product>
</Wix>
Note that the environment variables _BLDVERMAJOR, _BLDVERMINOR, and
_BLDNUMMAJOR are used to automatically update the version fields when building
the msi.
Anyone can give me some suggestions?
Thanks,
Xin
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users