Combine installation of SQL database with deployment of application

J

JDS

I have an application that needs to be deployed and include the setup
of a SQL Server 2005 Express database. There are several tasks that
need to be performed and I want to wrap them up in to a single
deployment package using Windows Installer. However, I am new to
deployment and I am struggling to find the answers on the basic msdn
help sections, e.g.
http://msdn2.microsoft.com/en-us/library/ybshs20f(VS.80).aspx
http://msdn2.microsoft.com/en-us/library/206sadcd(VS.71).aspx

In addition to installing the application itself and the .Net
framework I also need to perform the following tasks:
- check if SQL Server 2005 Express is already installed
- if not, perform a custom installation to include connectivity
components, etc
- check the existance of the database, if it does not exist then
install it
- run several sql scripts to attach the database, create logins,
users, subscriptions, etc
- create a Windows user

I have found how to perform a custom installation of SQL Server from
the command line:
http://msdn2.microsoft.com/en-us/library/ms144259.aspx
and how to add a windows user from the command line:
http://www.microsoft.com/resources/.../xp/all/proddocs/en-us/net_user.mspx?mfr=true
but I do not know the best way of combining these, the coying of the
database and the sql scripts into a deployment project.

Any help or pointers in the right direction would be really
appreciated.
 
J

JDS

Some more information:

I think I can handle some of these tasks using custom actions in the
deployment but still some questions.

I can handle the basic SQL Server 2005 Express installation by setting
it as a pre-requisite but not sure how to handle a custom install (for
connectivity components, replication, etc). One option is after
insallation to use a custom action to call the SQL setup with command
line options to modify the SQL installation. However, it would be
neater if I could specify the options on first install as part of the
deployment installation. Is there a way to do this, for example using
an .ini file?

I presume as well that I can use a custom action to copy the database
file, run the sql scripts and set up the Windows user account. Is this
the best way to achieve this? Any tips on how to set up a user account
directly from vb?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top