Question

I have created setup project with Visual Studio. I also need some custom actions - created DLL with Visual c++ and it works just fine but i don't want to include visual c++ runtime files to my project. So is it possible to build this dll with some other c++ compiler?

I have tried to make make it with Dev-c++ but when compiling i get few hundred compilation errors from files msi.h and msiquery.h

Was it helpful?

Solution

Probably the easiest solution is to link your DLLs against the static runtime lib.

OTHER TIPS

In general custom action DLLs should only rely on DLLs that are already in the system before the installation. This means, for example, statically linking the CRT, as noted by MSalters, but also applies to any other dependency on 3rd party libraries.

Another option is to link with the OS CRT, as Koby Kahane explains here.

I have made a custom dll for my setup project. My dll is very simple, registering few services, not CLR or any 3rd party lib dependent. Have statically linked with msi.lib only.

I have removed the .net and windows installer prerequisite requirements from the setup project. My setup fails on macines not having .net framework..?

As I have not having any .net dependent code, what should be the solution to this. I don;t want user to download framework first for installation.

Regards Amit

here you can find some short example using C++ DLLs for Custom Actions:

http://www.simple-talk.com/dotnet/visual-studio/visual-studio-setup---projects-and-custom-actions/

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top