cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Amarjeet
Level 7

Find installed SQL server(s) from Registry system Search

Hi

I am trying to search installed SQL server on my machine. Information about installed instances is stored at below registry key. I would like to detect any instance with any name.


[ATTACH=CONFIG]11192[/ATTACH]


As the instance name can be of any text string I find it very difficult to search by exact string name.

Going through install shield documentation I have found that there is no Wild Card search available in system search.

Is there any way I can find out installed SQL servers on machine ?

Thanks in advance.

Amarjeet
Labels (1)
0 Kudos
(4) Replies
rguggisberg
Level 13

Do you need to know if the SQL instance is running... or don't you care?
Do you want to output this list to the screen or to a text file?

I have attached a bat file renamed to SQLInstances.txt. Download that and rename it to SQLInstances.bat.
It will list 32 & 64 bit instances and tell you whether or not they are running. Output goes to display and to log file.
Could be simplified if you don't care if they are running or if you don't need the log file.
I use this in a Suite project. You could use it in a custom action to populate a list if you prefer.
0 Kudos
Amarjeet
Level 7

Hi Rguggisberg,

My requirement is - If any SQL server is installed on the machine I don't want to install new SQL server from my package. Its running OR NOT running does not matter.

I am happy to implement any mechanism which can provide me list of SQL servers installed. Even numbers will do.

Regards,

Amarjeet
0 Kudos
hidenori
Level 17

You may simply want to check for the existence of the Instance Names registry key under HKEY_LOCAL_MACHINE\Software\Microsoft\Microsoft SQL Server. The registry key does not exist if no instances of SQL Servers are installed.
0 Kudos
Amarjeet
Level 7

Hi Hidenori,

Thanks for your solution. It worked like a charm.

Amarjeet
0 Kudos