WIX Installing an EXE after Msi install finishes.

Posted by Chris on Stack Overflow See other posts from Stack Overflow or by Chris
Published on 2010-02-10T11:04:18Z Indexed on 2010/05/01 21:47 UTC
Read the original article Hit count: 455

Filed under:
|
|
|
|

Hi,

I have created an MSI package which when finishes runs an exe.

<Package InstallerVersion="200" Compressed="yes" />
    <Media Id="1" Cabinet="media1.cab" EmbedCab="yes" />
    <Directory Id="TARGETDIR" Name="SourceDir">
        <Directory Id="ProgramFilesFolder">
            <Directory Id="INSTALLLOCATION" Name="Installer Example">
                <Component Id="VSTOR30.EXE" Guid="4fb0aee7-ec5b-4179-8938-a2be4df8ca0e">
                    <File Id="VSTOR30.EXE" Source="C:\Projects\InstallationTarget\ExampleInstaller\VSTOR30.EXE" KeyPath="yes" Checksum="yes" />
                </Component>
            </Directory>
        </Directory>
    </Directory>
    <Feature Id="ProductFeature" Title="Installation Target" Level="1">
       <ComponentRef Id="VSTOR30.EXE" />
    </Feature>

    <InstallExecuteSequence>
        <Custom Action="RunEXE" After="InstallFinalize">NOT Installed</Custom>
    </InstallExecuteSequence>
    <CustomAction Id="RunEXE" FileKey="VSTOR30.EXE"
                  ExeCommand="[#VSTOR30.EXE]"
                  Execute="immediate"
                  Return="asyncNoWait">
    </CustomAction>
    <UI />

The MSI installs but the EXE is not run. I am calling it after Install Finalize and checking the install sequence in ORCA shows that it is being called at the correct time. I need deploy this through group policy software installation which uses a silent install without inputs. If i use a custom UI and run the EXE in the exit dialog

<UI>
    <UIRef Id="WixUI_Minimal" />
    <Publish Dialog="ExitDialog" 
        Control="Finish" 
        Event="DoAction" 
        Value="LaunchApplication">WIXUI_EXITDIALOGOPTIONALCHECKBOX = 1 and NOT Installed</Publish>
</UI>
<Property Id="WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT" Value="RunEXE" />

<!-- Step 3: Include the custom action -->
<Property Id="WixShellExecTarget" Value="[#VSTOR30.exe]" />
<CustomAction Id="RunEXE" 
    BinaryKey="WixCA" 
    DllEntry="WixShellExec"
    Impersonate="yes" />

Then i can install the software after the msi has finished running, however when putting this group policy the EXE doesn't install.

Is there anything i am missing?

Chris

© Stack Overflow or respective owner

Related posts about wix

Related posts about msi