This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Writing a custom component for Install Shield
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 16, 2012
02:26 PM
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
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
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 17, 2012
08:17 AM
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
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
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 17, 2012
06:16 PM
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.
The InstallShield help libraries are available on http://helpnet.flexerasoftware.com/, too.