Ok - let's break this down ...
1. You need the SQL 'definition' of your DB, logins, indices et al
This one is easy :) In SQL Management Studio, right click your DB, choose Generate Scripts, follow the wizard, and you should have the script required to create your DB from scratch
2. You need to ask the customer for
- SQL server details
- SQL admin login credentials, or integrated login
- name of the db to drop/create (don't ever assume the customer is happy with your choice of DB name)
- path to create it to, or use the SQL default
3. You need to execute the scripts generated in #1 on the server in #2
4. Your application needs to understand some items from #2
- server
- dbname
Items 2 & 3 can be done in a number of ways, here, we use Custom Scripts, Custom Tables and Custom UIs inside the MSI/setup.exe file, this may be beyond the scope you wish to take on, but there's an example
A Setup and Deployment project that passes parameters to the configuration file[
^] that talks about doing bits of that
You could install the sql scripts generated from #1 into a directory, then have a VBscript custom action run them, using information from the UI
Or alternatively, you could have a VB exe run the first time your app is run - and that should be easy to identify, because your app won't have any information it needs from #4
That should get you going ;)
Another thing to consider is having a schemaNumber table in your DB, then you can create update scripts by simply running a windiff over v1 #1 script and v2 #1 scripts