Natalie Carr
Natalie Carr

Reputation: 3807

Starting a second installer WIX

I have recently started creating installers in wix so i'm pretty new. Having a problem, When the user clicks a button i would like a second installer to start using a .exe file. However I cannot get my code to do this, im a bit confused as to which bit of code goes where but i have these three parts:

<Binary Id="HaspInstaller" SourceFile="visual studio 2010\Projects/ExampleInstaller/ExampleInstaller/bin/Debug/HASPUserSetup.exe" />

<CustomAction Id="HaspSetup" BinaryKey="HaspInstaller" ExeCommand="-switch" 
Execute="deferred" Return="check" HideTarget="no" Impersonate="no" />

<Control Id="Hasp" Type="PushButton" X="40" Y="60" Width="56" Height="34" Bitmap="yes"    Text="HaspImage" >
      <Publish Event="DoAction" Value="HaspSetup" /> 
    </Control>

Any help would greatly be appreciated..:)

N

Upvotes: 0

Views: 254

Answers (1)

caveman_dick
caveman_dick

Reputation: 6667

That will not run when you click the button due to the Execute attribute set as deferred. Mark it as immediate and it will run as soon as you click the button.

Deferred is for use when elevation is required and has to be scheduled into the InstallExecute sequence.

Take a look at http://wix.sourceforge.net/manual-wix3/qtexec.htm which is the quiet execute custom action and the page explains nicely how to set it up for both deferred and immediate execution.

Also if that exe file is a bootstrapper for another msi, you will not be able to run it at all due to the fact that you will already be in one MSI transaction. In that case use burn to bundle the different installers into a single-installer user experience.

Upvotes: 3

Related Questions