This means that maintenance is defined by REINSTALLMODE. You can just put this 
in a condition.

<Condition Message="!(loc.MessageRepairForbidden)">
        NOT REINSTALLMODE
</Condition>

-dB.

dB. @ dblock.org 
Moscow|Geneva|Seattle|New York



-----Original Message-----
From: Blair [mailto:os...@live.com] 
Sent: Friday, December 04, 2009 1:50 AM
To: 'General discussion for Windows Installer XML toolset.'
Subject: Re: [WiX-users] Prevent Maintenance mode (at beginning of UI seq.)

If the user sets the REINSTALL property on the commandline (usually it is
set by users to ALL but it could be any comma-delimited list of your
features) then the installation will enter maintenance mode. It will also
enter maintenance mode if they apply an MSP file or if they request removal.

If they simply double-click the MSI again, the default response is a dialog
telling them the product is already installed (and no sequence in the MSI
ever even starts, which is why the error message cannot be customized).

In maintenance mode installations, the Upgrade table is never evaluated.
Thus, your Upgrade entries won't ever be set.

Maintenance mode installations are not intended for "installations", they
are intended to allow installing and/or removing features from already
installed products, for applying updates to products (such as
patches/hotfixes/etc.), and for removing products (including the removal
phase of major upgrades when RemoveExistingProducts removes "old" products).

-----Original Message-----
From: Tom Crozier [mailto:tcroz...@rackwise.com] 
Sent: Thursday, December 03, 2009 8:33 AM
To: General discussion for Windows Installer XML toolset.
Subject: [WiX-users] Prevent Maintenance mode (at beginning of UI seq.)

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
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


------------------------------------------------------------------------------
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
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

------------------------------------------------------------------------------
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
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to