…today the Windows Installer does not support managed code CustomActions and the general direction appears to be to try to reduce the need for CustomActions overall.
Read the blog entry for the reasons. The strange thing is, Visual Studio 2005 has specific support for managed code custom actions; there is an Installer class and an MSDN walkthrough on how to use it.
Now, I have always avoided managed code custom actions anyway, but only from instinct. Windows Installer setups are problematic enough as it is; adding .NET Framework dependency seems unnecessary. Mensching’s post above explains why it is also error-prone. See also Aaron Stebner’s post from March 2005.
… in summary, I strongly encourage you to not use managed code in your product setup. I realize that some teams do this here at Microsoft, but please don’t use our bad (in my opinion) examples to justify doing so in your own setup….
Presuming these guys are right, might it not be wise for the Visual Studio folk to remove support for managed code custom actions from the product? A point of confusion is that the managed installer class works with a utility called InstallUtil which is distinct from the Windows Installer; in fact, I believe that Visual Studio setup projects which include managed code custom actions actually call InstallUtil.
I suggest Delphi as a handy alternative, if you would rather avoid Visual C++.
Finally, I hear many good things about Wix, the free XML-based authoring too for Windows Installer setups. If you are embarking on a new setup project it is worth a look.
- Delphi and Windows Installer: small problem, fiddly solution
- Why Windows Installer pops up when you run an application
- SharpDX: Managed DirectX for Metro from the community
- Flash 10.1 mobile roadmap confusion, Windows phone support far off
- Talk of Windows 8 on an smartphone shows Microsoft’s mobile confusion