All -
I want to prevent the installer from entering into maintenance mode.
I have set ARPNOMODIFY to 1 which prevents doing it through ARP.
But I don't want the user to be able to run the installer a second time, so I
tried creating a custom action to display an error message in the case that it
was already installed at the beginning of the UI sequence. From my tests it
seems that the Upgrade properties have not been set before the UI screens are
displayed even though I scheduled them after FindRelatedProducts.
Below is the test code snippets.
<Upgrade Id="$(var.UpgradeCode)">
<UpgradeVersion Minimum="$(var.FullBuildNumber)"
IncludeMinimum="yes"
Maximum="$(var.FullBuildNumber)"
IncludeMaximum="yes"
OnlyDetect="yes"
Property="SAMEVERSIONFOUND" />
<UpgradeVersion Minimum="$(var.FullBuildNumber)"
IncludeMinimum="no"
OnlyDetect="yes"
Property="NEWERPRODUCTFOUND" />
<UpgradeVersion Minimum="$(var.UpgradeSinceProductVersion)"
IncludeMinimum="yes"
Maximum="$(var.FullBuildNumber)"
IncludeMaximum="no"
Property="VERTOUPGRADEFOUND" />
</Upgrade>
<!-- Prevent Install -->
<CustomAction Id="PreventDowngrading" Error="Newer version already
installed." />
<CustomAction Id="PreventReinstall" Error="This version is already
installed. Please uninstall before running again." />
<CustomAction Id="PreventMaintenance" Error="This version is already
installed. Please uninstall before running again." />
<InstallUISequence>
<Custom Action="PreventDowngrading"
After="FindRelatedProducts">NEWERPRODUCTFOUND</Custom>
<Custom Action="PreventReinstall"
After="PreventDowngrading">SAMEVERSIONFOUND</Custom>
<Custom Action="PreventMaintenance" After="PreventReinstall">Installed
AND NOT VERTOUPGRADEFOUND</Custom>
Thanks - Tom
------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing.
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
_______________________________________________
WiX-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users