views:

637

answers:

1

I'm trying to create a very basic "Setup and Deployment" project using Visual Studio. What I would like is the ability to choose which components to install. Let's say that each component consists in the primary output of a single class library (i.e. each component is actually a single module or compiled assembly).

I haven't seen such an option in the standard set of available dialogs. But I have seen that with a little effort we can somehow create custom dialogs.

  • How can I programmatically detect which component are available as part of the setup and deployment project? (i.e. I would like the project to work even when adding or removing a component from the installation)

  • How do I extend or create a custom dialog that displays the list of available components?

  • How do I detect which components the end-user has choosen to install?

I'm somewhat familiar with Orca, the tool to manipulate .msi files as well as full blown installer applications like InstallShield, but I would like to make this using only raw Visual Studio and other available open-source tools.

Thanks for your help.

A: 

VDP (Visual studio Deployment Project) is not cut out for this kind of stuff (read: use Wix instead):

  1. (I'm guessing you want this at runtime) You can use MsiQueryComponentState but for that you will need to pass the component GUID which in VDP you don't have control over.
  2. This comes out of the box with everything other then VDP.
  3. (I'm guessing you want this at setup time...) You can use Condition in order to execute custom action based upon Component Install State, in VDP you don't have control over the component id (not to be confused with the component guid) which is needed in order to preform component condition.
Shay Erlichmen
Well, yes I was kind of expected this answer.No harm in asking anyway...Thanks.
Maxime Labelle