views:

19

answers:

1

I have a bit of a noob question about Windows Setup projects here. I've searched vigorously, but haven't yet found any answer.

Basically, I'm building a Windows Setup project in Visual Studio 2008. As part of the project, I have custom actions for Install, BeforeInstall, etc. For this, I use a C# class library that contains a class that inherits from System.Configuration.Install.Installer. This all works well, except it all happens during the time the Windows Setup GUI has already been displayed and the user's already confirmed the install path, etc.

How can I change the project so that I can run a custom action or display custom dialogs before the Windows Setup GUI ever appears?

A: 

Okay, I figured out a workaround.

My goal was to find a solution that allowed me to use a Windows Setup project (since I don't have money for InstallShield, etc.)

Basically, I use my output .MSI as an embedded resource in another project. This other project runs, does the checks I need it to do, and then runs the embedded resource with msiexec.

This may sound a little bit silly, but the result seems elegant enough and it appears to be robust.

Tom