I use Wix to create my installer and I want to use a custom installer to install the Runtime components as recommended in your KB7 article. How to do I do this from Wix?
The following snippet shows how to correctly trigger the customer installer class in your assembly (e.g. the installer class mentioned in KB7 http://www.inishtech.com/kb7) to install the SLPS runtime components.
In <Product>.wxs file, please add the following:
<CustomAction Id="ManagedInstall" Execute='deferred' Impersonate='no'
Directory='INSTALLFOLDER'
ExeCommand='"[WindowsFolder]Microsoft.NET\Framework\v4.0.30319\InstallUtil.exe" /LogToConsole=false "ConsoleAppWix.exe"'
Return='asyncNoWait'>
</CustomAction>
<InstallExecuteSequence>
<Custom Action='ManagedInstall' Before="InstallFinalize" />
</InstallExecuteSequence>
As one can see these are what needed in the custom action:
a) Add the Execution=’deferred’ property to ensure deferred execution of the install custom action
b) Add the Impersonate=’no’ to ensure that the action runs with the correct admin privilges
c) Ensure that the custom action occurs before the "InstallFinalize" step