Advertisement
Guest User

Basic WiX "Launch app after install" example

a guest
Oct 11th, 2012
635
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 1.84 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
  3.   <Product Id="*"
  4.           UpgradeCode="{93BD0BB0-C4D8-497F-B27C-C79E535F3163}"
  5.           Version="1.0.0.0"
  6.           Language="1033"
  7.           Name="myapplication"
  8.           Manufacturer="Acme Inc">
  9.     <Package InstallerVersion="300" Compressed="yes"/>
  10.     <Media Id="1" Cabinet="myapplication.cab" EmbedCab="yes" />
  11.  
  12.     <!-- The following three sections are from the How To: Add a File to Your Installer topic-->
  13.     <Directory Id="TARGETDIR" Name="SourceDir">
  14.       <Directory Id="ProgramFilesFolder">
  15.         <Directory Id="APPLICATIONROOTDIRECTORY" Name="My Application Name"/>
  16.       </Directory>
  17.     </Directory>
  18.  
  19.     <DirectoryRef Id="APPLICATIONROOTDIRECTORY">
  20.       <Component Id="myapplication.exe" Guid="{D8AC590C-C7BA-48BE-8DCE-59535D521DE7}">
  21.         <File Id="myapplication.exe" Source="..\myapplication\bin\release\myapplication.exe" KeyPath="yes" Checksum="yes"/>
  22.       </Component>
  23.     </DirectoryRef>
  24.  
  25.     <Feature Id="MainApplication" Title="Main Application" Level="1">
  26.       <ComponentRef Id="myapplication.exe" />
  27.     </Feature>
  28.  
  29.     <!-- Step 2: Add UI to your installer / Step 4: Trigger the custom action -->
  30.     <UI>
  31.       <UIRef Id="WixUI_Minimal" />
  32.       <Publish Dialog="ExitDialog"
  33.          Control="Finish"
  34.          Event="DoAction"
  35.          Value="LaunchApplication">WIXUI_EXITDIALOGOPTIONALCHECKBOX = 1 and NOT Installed</Publish>
  36.     </UI>
  37.     <Property Id="WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT" Value="Launch My Application Name" />
  38.  
  39.     <!-- Step 3: Include the custom action -->
  40.     <Property Id="WixShellExecTarget" Value="#myapplication.exe" />
  41.     <CustomAction Id="LaunchApplication"
  42.        BinaryKey="WixCA"
  43.        DllEntry="WixShellExec"
  44.        Impersonate="yes" />
  45.   </Product>
  46. </Wix>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement