Managed code custom actions are officially unsupported. See Rob Mensching's
blog at
http://robmensching.com/blog/archive/2007/04/19/Managed-Code-CustomActions-n
o-support-on-the-way-and-heres.aspx for the reasons.

 

The Visual Studio surrogate custom action DLL is completely undocumented.

 

I strongly recommend you use a C++ custom action or find another way to do
whatever you're doing. Installing a service, one of the most common reasons
for using the .NET Framework Installer classes, is a native feature of
Windows Installer and is fully supported by WiX.

 

-- 

Mike Dimmick

 

  _____  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Arnold Layne
Sent: 01 July 2007 13:48
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] Managed Code Custom Actions

 

Hi,

 

I'm writing a custom action in C# and would like to pass it the path to
which I extract my binaries. I have defined the directory:

<Directory Id='Foo' Name='Foo' LongName='Foo'/>

 

and defined a custom actions:

<CustomAction Id='Bar' BinaryKey='InstallUtil' DllEntry='ManagedInstall'
Execute='Deferred' />

<CustomAction Id='BarSetProp' Property='Bar'
Value='/installtype=notransaction /action=install /MyBinaries=[Foo]
/LogFile= "[#MyCustomAction.dll]" "[VSDFxConfigFile]"' /> 

 

Running the MSI is terminated upon failure with an empty message box and
logs say that the custom action has leaked an MSIHANDLE. Also, you can see
in the logs that the [Foo] was expanded properly to my binaries folder.
Removing the "/MyBinaries" parameter makes the setup work. My WIX version
is: 2.0.3620.

Has anyone encountered this problem? What is the best practice to pass
arguments to a managed custom action?

 

Thanks,

-al

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to