Domanda

I have a C# application (I use Visual Studio 2010). I added a setup project to my app, like that: File -> Add -> New Project -> Setup project.

I order to work correctly, my application requires Code::Blocks.

I want to add the Code::Blocks installer, to my Setup project for my application, so that when the user runs the setup (to install my app), it should have the posibility to install Code::Blocks directly from the setup of my app (of course, if it isn't installed on the user machine).

More exactly: the user runs the setup for my application. It presses "next", and then the setup should run the Code::Blocks installer if it isn't installed on the user machine. The user installs the Code::Blocks, and then the setup of my app continues normally.

How can I do that? I've searched on every menu but I can't figure out where is the solution!

Thank you respectfully.

È stato utile?

Soluzione

You have to create a Custom Action for that. That is an Installer-specific type of class that you then register as an action in the Setup project.

In a Custom Action, you can do anything you want, such as verify the existence of a registry key (which would indicate the presence of installed software), run EXEs, etc.

To find out more, check out these links:

Incidentally, Visual Studio 2012 and 2013 do no longer come with Setup project support; instead you can install the (free) InstallShield Limited Edition. But guess what: the InstallShield Limited Edition cannot execute custom action classes from .NET DLL projects, only as command-line EXEs. Just so you know that, when you upgrade to a more recent Visual Studio, you'll have some work to recreate your installer and modify your custom action classes.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top