Does any body know how can i call a dll function from InstallShield or InstallAware.
Asked
Active
Viewed 3,753 times
3

Ghyath Serhal
- 7,466
- 6
- 44
- 60
-
What does the documentation of those products tell you? What problems did you encounter when you tried to follow the documented instructions? – David Heffernan Jan 11 '11 at 10:24
-
The documentation tell me that i can call a dll function, but there is no any code sample to show me show to do it. – Ghyath Serhal Jan 11 '11 at 10:35
-
@Ghyath I don't believe that. I suggest you look harder in the documentation. – David Heffernan Jan 11 '11 at 10:41
-
@Ghyath Also, it's often the case that you don't actually need to call a custom DLL and could do it a simpler way. – David Heffernan Jan 11 '11 at 10:42
-
Ok I will try, any way Thank you David – Ghyath Serhal Jan 11 '11 at 10:45
-
Suggest breaking this out into two questions. One for InstallAware and one for InstallShield. It's like your asking how to do something in C# and VB.Net. – Christopher Painter Jan 11 '11 at 20:04
2 Answers
1
One must first know more about the DLL. Is it a WinPE ( native ) dll with exported functions? Is it a COM server? Or perhaps it is a .NET assembly with or without ComVisible types.
A better answer can be provided if there is more information.
For InstallShield:
One way to consume a .NET ComVisible class is to write an InstallScript custom action and use the DotNetCoCreateObject() function.
Another approach would be to define a managed custom action. Here is an tutorial.
But my favorite approach is to write a DTF custom action to encapsulate your assembly.

Christopher Painter
- 54,556
- 6
- 63
- 100
-
-
@Ghyath are you sure that your users will have the necessary version of .net at the time this install action will run? – David Heffernan Jan 12 '11 at 12:35