cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
ewgoforth
Level 4

Writing a custom component for Install Shield

Hello,

I'm doing some prelimiary investigation into writing a custom dll to be called by an installshield script. I found an example of this at: http://www.flexerasoftware.com/webdocuments/PDF/dlls-for-ipwi.pdf

However, the example is using C++. This example is five years old, and from the terminology being used I think it's talking about doing unmanaged C++. Is it possible to make a custom managed C# dll to be called by an installshield script?

Thanks,
-Eric
Labels (1)
0 Kudos
(2) Replies
ewgoforth
Level 4

Hi,

I did some digging around it appears that it is possible. In the "Installation Designer" go to "Behavior and Logic" then "Custom Actions and Sequences." Then click on Custom Actions. You can then pick "Call a public method in a managed assembly..." According to the Installshield Help Library:

If you include a managed-code custom action in your project, InstallShield creates a C++ Windows Installer wrapper DLL for your .NET assembly. The wrapper DLL includes your assembly, as well as the information that is required to mediate, load, and run the assembly.

So I guess it's basically creating a C++ wrapper similar to what I found in that other article.

One suggestion, it seems like there's a lot of information that's in the online help, that isn't readily available over the flexera website. The online help is nice, but I suspect that a lot of people, like me, have gotten in the habit of using the web first, instead of online help. It would probably be nice if the online help was published on the web as well. Maybe it is, but I couldn't find this information easily.

Thanks,
Eric
0 Kudos
RobertDickau
Flexera Alumni

Right, C-callable DLL functions with a specific signature are "native" to Windows Installer, where managed assemblies currently aren't. Calling code that isn't something MSI knows about generally boils down to sneaking that code in, disguised as one of the known types.

The InstallShield help libraries are available on http://helpnet.flexerasoftware.com/, too.
0 Kudos