Community Forums
Results 1 to 3 of 3

Thread: Writing a custom component for Install Shield

  1. #1
    Join Date
    Jul 2012
    Posts
    12

    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/webdo...s-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

  2. #2
    Join Date
    Jul 2012
    Posts
    12
    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

  3. #3
    Join Date
    Oct 2001
    Location
    Here and there
    Posts
    16,243
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •