PDA

View Full Version : MSDE installation



jburkeen
10-10-2003, 03:12 PM
I have created an installation that includes the install for MSDE.
My problem is that when I go to install my product on a machine that already has SQL 2000 loaded, the install fails on the MSDE installation. Does anyone know of a way to make the MSDE install
only when SQL is not already present on a system?
Right now my only solution is to have two separate builds - one for users with SQL already loaded and one build for user that don't have SQL.
Thanks!

BCastleman
10-14-2003, 09:06 AM
This may not be the best way, but if MSDE or SQL Server is installed on the target machine AND it is NT based then the SQL-DMO method ListAvailableServers will give you all the SQL Servers visible to that machine and you can use that to determine if there is a conflict with the instance name you are using.

alex42
10-14-2003, 09:14 AM
alternatively, you can read out 'InstalledInstances' from Software\\Microsoft\\Microsoft SQL Server...

BCastleman
10-14-2003, 11:06 AM
Looking at the registry might be more reliable as SQL-DMO is not available unless SQL Server is already installed. So if you try to create a SQL-DMO object on a clean machine, it will fail. You could trap for this type of error, though.