jake
jake

Reputation: 1415

how to start an application after setup wizard (visual studio 2010) completes

i am using visual studio 2010 (C#, .NET 4) to create a setup wizard project. i need to make sure the application (a windows form application) starts after it installs. towards this goal, i have specified a custom action. in particular, what i do is (inside the windows form application project) extend the System.Configuration.Install.Installer class; inside this class's constructor, i add a new event handler to the Comitted event. the event handler simply calls System.Diagnostics.Process.Start(string path), where path is the path to the executable file.

now back in the setup wizard project, under Custom Action -> Commit, I add the primary output from the windows form application.

this "works" somewhat, but not really. when i run the setup wizard (when i actually try to install), the wizard progresses almost all the way through, starts up the windows form, but then never exits and moreover, the progress bar never quite reaches 100%. unless i exit the windows form application, then the installer "hangs" in this state.

i've done quite a few search on the internet and tried different combinations (i.e. put the code to Process.Start in different events with placing the custom action in Install vs Commit), but some of the flat out fail. i can provide references if needed.

anyone have any pointers on how to use visual studio 2010's setup wizard to start up a windows form application successfully (and exit itself)?

Upvotes: 5

Views: 6509

Answers (1)

Cosmin
Cosmin

Reputation: 21436

Perhaps this will help: Run exe after msi installation?

Upvotes: 5

Related Questions