cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
gkriggs
Level 6

Extract support files during UI sequence?

Hello,

I want to create a single file setup.exe install, and I want to run a .NET method (via DotNetCoCreateObject in an InstallScript custom action) when a user clicks on a button during the UI sequence.

I added my .NET assembly file to "Behavior and Logic/Support Files/Language Independent", and in my InstallScript custom action function, I'm looking for my file in SUPPORTDIR, but I'm not finding it there. How can I extract a support file, and where should I expect it to find it?

Thanks,
Greg
Labels (1)
0 Kudos
(3) Replies
Christopher_Pai
Level 16

Use MsiGetProperty( hMSI, "SUPPORTDIR" .... ) instead of SUPPORTDIR. Examples can be found on my blog.

BTW, DTF is a much better solution now and I don't really reccommend DotNetCoCreateObject() anymore. DTF will automatically consume your project dependencies that are marked CopyLocal true and package them into a neat MSI dll exposing a Type 1 function call. Eliminates the need for SUPPORTDIR all together and gives you better reliability and communications with the msi handle ( um, session class ).
0 Kudos
gkriggs
Level 6

I didn't realize that new feature was available; it works great. Thanks!
0 Kudos
Christopher_Pai
Level 16

MsiGetProperty or DTF?
0 Kudos