[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1340
  • Last Modified:

Moving the WIX Checkbox

I am trying to move the Launch Application checkbox found at the end of the WIX installation process dwon to the navigation bar.  I have tried using a Post Build script and I have tried customizing the WixUI_InstallDir using a Fragment - nothing is working.
0
ktola
Asked:
ktola
  • 4
  • 3
1 Solution
 
ktolaAuthor Commented:
OK - I have no download and installed WIX 3.0 about 4 times and tried to get all of the sopurce files and I STILL do not see the src folder - is there somewhere else this thing is loaded?
0
 
ktolaAuthor Commented:
I found the source files for WIX at http://wix.sourceforge.net/releases/
As it turns out, all I need to do was change the condition you set to:

WIXUI_EXITDIALOGOPTIONALCHECKBOX = 1 and NOT Installed
 instead of

WIXUI_EXITDIALOGOPTIONALCHECKBOX and NOT Installed
The complete version is below:
 

<!-- Here is the part that goes in the Product element
<UI>
      <!-- Options here are WixUI_Minimal, WixUI_InstallDir, WixUI_FeatureTree and WixUI_Mondo -->
      <!-- WixUI_Minimal is about where most normal Setup projects end-->
      <!-- WixUI_InstallDir allows users to choose an install directory-->
      <!-- We use uses a custom UI found in the fragment below -->
      <UIRef Id="WixUI_InstallDir_Custom"/>
    </UI>

    <!-- This property turns on a checkbox letting a user conditionally launch the app-->
    <Property Id="WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT" Value="Start My Application!" />

    <!--This property tells WIX that we are using a custom script and to run the MyApp.exe ID'd KeyFile entry-->
    <CustomAction Id="StartAppOnExit" FileKey="MyApp.exe" ExeCommand="" Execute="immediate" Impersonate="yes" Return="asyncNoWait" />

<!-- Here is the Fragment copied after the closing Product tag-->
<Fragment>
    <UI Id="WixUI_InstallDir_Custom">
      <TextStyle Id="WixUI_Font_Normal" FaceName="Tahoma" Size="8" />
      <TextStyle Id="WixUI_Font_Bigger" FaceName="Tahoma" Size="12" />
      <TextStyle Id="WixUI_Font_Title" FaceName="Tahoma" Size="9" Bold="yes" />
      <Property Id="DefaultUIFont" Value="WixUI_Font_Normal" />
      <Property Id="WixUI_Mode" Value="InstallDir" />
      <DialogRef Id="BrowseDlg" />
      <DialogRef Id="DiskCostDlg" />
      <DialogRef Id="ErrorDlg" />
      <DialogRef Id="FatalError" />
      <DialogRef Id="FilesInUse" />
      <DialogRef Id="MsiRMFilesInUse" />
      <DialogRef Id="PrepareDlg" />
      <DialogRef Id="ProgressDlg" />
      <DialogRef Id="ResumeDlg" />
      <DialogRef Id="UserExit" />
      <Publish Dialog="BrowseDlg" Control="OK" Event="DoAction" Value="WixUIValidatePath" Order="3">1</Publish>
      <Publish Dialog="BrowseDlg" Control="OK" Event="SpawnDialog" Value="InvalidDirDlg" Order="4">
        <![CDATA[ WIXUI_INSTALLDIR_VALID<>"1"]]>
      </Publish>

      <Publish Dialog="ExitDialog2" Control="Finish" Event="DoAction" Value="StartAppOnExit" Order="1">WIXUI_EXITDIALOGOPTIONALCHECKBOX = 1</Publish>
      <Publish Dialog="ExitDialog2" Control="Finish" Event="EndDialog" Value="Return" Order="999">1</Publish>
      
      <Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="LicenseAgreementDlg">1</Publish>
      <Publish Dialog="LicenseAgreementDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg">1</Publish>
      <Publish Dialog="LicenseAgreementDlg" Control="Next" Event="NewDialog" Value="InstallDirDlg">LicenseAccepted = "1"</Publish>
      <Publish Dialog="InstallDirDlg" Control="Back" Event="NewDialog" Value="LicenseAgreementDlg">1</Publish>
      <Publish Dialog="InstallDirDlg" Control="Next" Event="SetTargetPath" Value="[WIXUI_INSTALLDIR]" Order="1">1</Publish>
      <Publish Dialog="InstallDirDlg" Control="Next" Event="DoAction" Value="WixUIValidatePath" Order="2">NOT WIXUI_DONTVALIDATEPATH</Publish>
      <Publish Dialog="InstallDirDlg" Control="Next" Event="SpawnDialog" Value="InvalidDirDlg" Order="3">
        <![CDATA[ NOT WIXUI_DONTVALIDATEPATH AND WIXUI_INSTALLDIR_VALID<>"1"]]>
      </Publish>
      <Publish Dialog="InstallDirDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg" Order="4">WIXUI_DONTVALIDATEPATH OR WIXUI_INSTALLDIR_VALID="1"</Publish>
      <Publish Dialog="InstallDirDlg" Control="ChangeFolder" Property="_BrowseProperty" Value="[WIXUI_INSTALLDIR]" Order="1">1</Publish>
      <Publish Dialog="InstallDirDlg" Control="ChangeFolder" Event="SpawnDialog" Value="BrowseDlg" Order="2">1</Publish>
      <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="InstallDirDlg" Order="1">NOT Installed</Publish>
      <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="MaintenanceTypeDlg" Order="2">Installed</Publish>
      <Publish Dialog="MaintenanceWelcomeDlg" Control="Next" Event="NewDialog" Value="MaintenanceTypeDlg">1</Publish>
      <Publish Dialog="MaintenanceTypeDlg" Control="RepairButton" Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
      <Publish Dialog="MaintenanceTypeDlg" Control="RemoveButton" Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
      <Publish Dialog="MaintenanceTypeDlg" Control="Back" Event="NewDialog" Value="MaintenanceWelcomeDlg">1</Publish>

      <Dialog Id="ExitDialog2" Width="370" Height="270" Title="!(loc.ExitDialog_Title)">
        <Control Id="Finish" Type="PushButton" X="236" Y="243" Width="56" Height="17" Default="yes" Cancel="yes" Text="!(loc.WixUIFinish)" />
        <Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56" Height="17" Disabled="yes" Text="!(loc.WixUICancel)" />
        <Control Id="Bitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="234" TabSkip="no" Text="!(loc.ExitDialogBitmap)" />
        <Control Id="Back" Type="PushButton" X="180" Y="243" Width="56" Height="17" Disabled="yes" Text="!(loc.WixUIBack)" />
        <Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370" Height="0" />
        <Control Id="Description" Type="Text" X="135" Y="70" Width="220" Height="20" Transparent="yes" NoPrefix="yes" Text="!(loc.ExitDialogDescription)" />
        <Control Id="Title" Type="Text" X="135" Y="20" Width="220" Height="60" Transparent="yes" NoPrefix="yes" Text="!(loc.ExitDialogTitle)" />
        <Control Id="OptionalCheckBox" Type="CheckBox" X="155" Y="100" Width="10" Height="10" Hidden="no" Property="WIXUI_EXITDIALOGOPTIONALCHECKBOX" CheckBoxValue="1" >
          <Condition Action="show">WIXUI_EXITDIALOGOPTIONALCHECKBOX = 1 and NOT Installed</Condition>
        </Control>
        <Control Id="OptionalText" Type="Text" X="170" Y="100" Width="220" Height="80" Hidden="no" Transparent="yes" NoPrefix="yes" Text="Start My Application!">
          <Condition Action="show">WIXUI_EXITDIALOGOPTIONALCHECKBOX = 1 and NOT Installed</Condition>
        </Control>
      </Dialog>

      <Dialog Id="ConfirmUpgradeDialog" Y="10" Width="260" Height="85" Title="Another version found">
        <Control Id="No" Type="PushButton" X="132" Y="57" Width="56" Height="17" Default="yes" Cancel="yes" Text="!(loc.WixUINo)">
          <Publish Event="EndDialog" Value="Exit">1</Publish>
        </Control>
        <Control Id="Yes" Type="PushButton" X="72" Y="57" Width="56" Height="17" Text="!(loc.WixUIYes)">
          <Publish Event="EndDialog" Value="Return">1</Publish>
        </Control>
        <Control Id="Text" Type="Text" X="48" Y="15" Width="194" Height="30" Text="Earlier version of [ProductName] is already installed. Do you wish to upgrade?" />
        <Control Id="Icon" Type="Icon" X="15" Y="15" Width="24" Height="24" ToolTip="!(loc.CancelDlgIconTooltip)" FixedSize="yes" IconSize="32" Text="!(loc.CancelDlgIcon)" />
      </Dialog>

      <Property Id="ARPNOMODIFY" Value="1" />
    </UI>
    
    <InstallUISequence>
      <Show Dialog="ExitDialog2" OnExit="success" />
      <Show Dialog="ConfirmUpgradeDialog" After="FindRelatedProducts">NOT Installed AND (PREVIOUSVERSIONFOUND OR PREVIOUSVERSIONFOUND2)</Show>
    </InstallUISequence>

    <AdminUISequence>
      <Show Dialog="ExitDialog2" OnExit="success" />
    </AdminUISequence>

    <UIRef Id="WixUI_Common" />
  </Fragment>

Open in new window

0
 
Mike_MozhaevCommented:
Set WIXUI_INSTALLDIR property:

<Property Id="WIXUI_INSTALLDIR">INSTALLDIR</Property>
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
Mike_MozhaevCommented:
> WIXUI_EXITDIALOGOPTIONALCHECKBOX and NOT Installed

Does it skip launching the application if checkbox is not checked?
0
 
Mike_MozhaevCommented:
Sorry, about WIXUI_INSTALLDIR. I misunderstood your comment
0
 
Mike_MozhaevCommented:
In addition... I set the following properties in my wxs file:

        <Property Id="WIXUI_EXITDIALOGOPTIONALCHECKBOX" Value="1" />
        <Property Id="WIXUI_EXITDIALOGOPTIONALTEXT" Value="Launch $(var.ProductName)" />

Probably that can resolve your checkbox problem.
0
 
ktolaAuthor Commented:
Thank you very much for all of your help!
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now