[wix-users] Only use fragment on new install, not upgrade

Phil Wilson phil.wilson at mvps.org
Wed Aug 26 09:51:45 PDT 2015


You should be able to use the WIX_UPGRADE_DETECTED property in the Publish
condition if you want to avoid showing the dialog on an upgrade (assuming
you're using a MajorUpgrade element. That property name might be different
if you rolled your own upgrade. You'd probably add "and not
WIX_UPGRADE_DETECTED" to the condition. 

Phil W  

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of
Brian Enderle
Sent: Tuesday, August 25, 2015 11:39 AM
To: WiX Users
Subject: [wix-users] Only use fragment on new install, not upgrade

I have the following fragment in my Product.wxs file that shows a screen in
which the user can enter SQL information.

  <!-- Custom UI definition -->
  <Fragment>
    <UI Id="WixUI_CustomInstallDir">
      <!-- Use WixUI_InstallDir as base UI -->
      <UIRef Id="WixUI_InstallDir" />

      <!-- Add new screen to capture Account Info between InstallDir and
VerifyReady -->
      <DialogRef Id="AcctInfoDlg" />
      <!-- From InstallDirDlg, Next button takes us to AcctInfoDlg -->
      <Publish Dialog="InstallDirDlg" Control="Next" Event="NewDialog"
Value="AcctInfoDlg" Order="4">WIXUI_DONTVALIDATEPATH OR
WIXUI_INSTALLDIR_VALID="1"</Publish>
      <!-- From VerifyReadyDlg, Back button takes us to AcctInfoDlg-->
      <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog"
Value="AcctInfoDlg">NOT Installed</Publish>
    </UI>

    <Property Id="WIXUI_INSTALLDIR" Value="INSTALLFOLDER" />
  </Fragment>

Is it possible to turn off this fragment if the product is already installed
(i.e., skip the AcctInfDlg screen) since this info would already be in a
configuration file stored in ProgramData?


Brian

If you can't explain it simply, you don't understand it well enough.  -
Albert Einstein

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant
http://www.firegiant.com/




More information about the wix-users mailing list