I'm using a Visual Studio Setup Project to create a setup program for my new Windows program (single EXE file). The only thing it seems to be missing is a way to run a component installer. I need to bundle and run a separate installer EXE with my program, but whenever I try to run it as a custom action, I get the "nested installer" error (You cannot run a setup within a setup).
So, short of buying a commercial installation program ($$$$), is there a way to write a custom action to do this? I've seen a few tutorials on this, and it doesn't look that intimidating, but I'm worried about getting the custom action to run after (or before) that setup transaction lock is freed so the next installer can run.
Suggestions?
Thanks!
Go to Extensions > Manage Extensions > Online > Search, find, download and install Microsoft Visual Studio Installer Projects extension. 2). Add a new Setup Project in your solution > right-click Application Folder > Add > Project Output… > choose the corresponding Project > select Primary output > OK.
In the Windows Start menu, you can search for "installer", and then select Visual Studio Installer from the results. If you have Visual Studio open, select Tools > Get Tools and Features..., which opens the Visual Studio Installer.
On the Action menu, click Add Custom Action. In the Select Item in Project dialog box, double-click the Application Folder. Select the gadget assembly that was added to the setup project, and then click OK. In the Properties window, make sure that the InstallerClass property is set to True (this is the default).
Basically what you want, in MSI terms, is a Custom Bootstraper. Setup and Deployment projects have limited support for this. Adding Custom Prerequisites (latest version) details how to add pre-requisites to the built-in bootstrapper.
Unfortunately Setup and Deployment projects are not supported in Visual Studio 2012; so, spending much time on something like this may not add much long term value.
WiX is another MSI installer framework that is recommended by folks at Microsoft (the authors work at Microsoft). It has a feature that it calls Bundling that allows chaining of MSIs (via its bootstrapper). It's really easy to create a WiX project from and existing MSI using a utility called Dark (http://weblogs.asp.net/lorenh/archive/2004/05/09/128899.aspx is a good intro to using Dark). Once you get that can edit the wxs file to add a bundle.
Other Wix resources: http://wix.tramontana.co.hu/tutorial
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With