0

Suppose I have a dialog box for giving an instance name and I want to see what are the other instances available in the local machine or the server and what if the user has both SQL Server 2005 and SQL Server 2008 installed in his system and I want to choose the instance name to deploy the database into. How do I achieve this using a Setup project created using Visual Studio 2010?

Please guide me as I'm new to Setup project. Thanks

user3085636
  • 15
  • 1
  • 7

1 Answers1

0

The problems are that VS setups don't let you build your own customized dialogs to show at the start, and don't let you run code to populate them or validate the contents. That means you're not really using the setup project because you'll end up writing your own code to do all this. Although you might be tempted to run this code as custom action, it will run with the system account (in an Everyone install) and the dialogs won't work properly because you'll not be running in a Windowing STA context. So you could integrate all this into the setup if you used another tool (such as WiX) and designed your own dialog to show during the standard install dialogs. The general design pattern is that you collect the info and stoer it into properties that are used with cusom actions in the execute sequence to make the changes. This happens to enabled silent install, specifying the property values on the msiexec command line or group policy delivery.

With VS you'd be better off having the user run your code to configure all this after the install at first run of the app.

PhilDW
  • 20,260
  • 1
  • 18
  • 28
  • yes ur right about it but i dont want to use a third party tool as it compromises security issues. As I'm stuck with this I would really like to know a way around. Thanks anyways. @PhilDW – user3085636 Mar 17 '15 at 05:31
  • WiX is used to build Microsoft MSI installs - there's no security compromise. In any case, the security is handled by Windows and the MSI file, and the tool used cannot compromise that. – PhilDW Mar 18 '15 at 16:28