Packaging MSDE in with Winforms C# app, using Windows packages

P

Paul Aspinall

Hi
I want to package my C# winforms app, to be deployed with MSDE, as easily as
possible for the end user.

I want to create an MSI or Installshield (prefer MSI), to setup my C# app,
together with MSDE (if not already installed), and the MSDE application DB.

How can I detect if MSDE is already installed??

Has anyone does this?? How??

Thanks


Paul
 
A

Andrew D. Newbould

Paul Aspinall said:
Hi
I want to package my C# winforms app, to be deployed with MSDE, as easily as
possible for the end user.

I want to create an MSI or Installshield (prefer MSI), to setup my C# app,
together with MSDE (if not already installed), and the MSDE application DB.

How can I detect if MSDE is already installed??

Has anyone does this?? How??

Everything I have found on the subject of packaging MSDE in your own MSI
or InstallShield package says "Just Don't Do It". It has many with
problems to deal with. This really only leaves two choices.

1. Include the standard MSDE package on your CD (or other Distribution
Media) and provide installation instructions which tell the user how to
install MSDE if required (remember the user might already have MSDE or
SQL Server installed and prefer to use that instance). In addition, you
would then need to provide a little setup / configuration program (or
embed it in your application) to Create the Database and associated
Tables etc. Obviously, this is a long winded method and can create
plenty of support calls / emails from the non computer literate.

2. The preferred method is to use the MSDE / SQL Server Deployment
Toolkit available for free download from MSDN. The includes a C# and
VB.Net examples plus full instructions to install (MSDE) and deploy your
database. This new customised package can then be called from your main
/ normal MSI or InstallShield package during the installation process.

I believe method 2 also can detect an existing instance to abort the
installation or install under a new named instance.

As for detecting whether MSDE is already installed (ie: if using method
1 above), I think the simplest way would be to add a Custom Action to
your MSI / InstallShield package to check the existence of several know
registry keys under HKLM and HKCU.
 

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