I have written a .NET CustomAction and have added it to a merge module
project. After I compile the MSM and look at it in Orca, I notice the Binary
table has one row whose Name value is "InstallUtil". In the CustomAction
table, there are eight rows. There is a pair of rows for each action -
install, uninstall, rollback, and commit. The first row of each pair looks
like this:
Action = <guid>.install
Type = 1025 (that decimal)
Source = InstallUtil
Target = ManagedInstall
The other row looks like this:
Action = <same guid as above>.install.SetProperty
Type = 51 (formatted text)
Source = <same guid as above>.install
Target = /installtype=notransaction /action=install /LogFile= "[#<guid
referencing File.File value for my CA>]" "[VSDFxConfigFile]"
I understand the first row is actually a call to the InstallUtilLib.dll shim
and MangedInstall is the (only) entry point into that DLL. It appears the
second row sets up the CustomActionData to be passed to the ManagedInstall
exported function. From my testing I can see where ManagedInstall actually
kicks off InstallUtil.exe and pass the CustomActionData to my CA, which is a
physical file delivered to the disk.
Instead of leaving the CA on the target machine, I would like to embed my CA
into the Binary table and use the stream instead of a delivered file. Using
Orca, it is no problem for me to add my CA DLL into a stream in the Binary
table. My problem is how to I reference it in the CustomAction row that sets
up the parameters for the call to InstallUtilLib.ManagedInstall?
InstallUtil.exe appears to need to have a file on disk. How do I get my CA
out of the binary stream and into a physical file that InstallUtil.exe can
use? Or is there another way to skin this cat?
After this problem is solved, I have another downstream problem. In the
ModuleInstallExecuteSequence, the value in the Condition column for the 8
CustomAction rows is
$C__F4A03234F2024C5A925477584A7AB015.C23F5328603A4FD096CB1632F18AC7F2>2. The
C__F4A... is the component that is my CA. Once I embed the CA as a binary
stream, what do I put here in its place?
Thanks for any help you may have,