cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
infopar
Level 3

Registry conditions on prerequisites

Hello,

After all, what is the recommended way to determine if any version of SQL Server is installed on the target machine? It seems that checking if the entry InstalledInstances under the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server key exists would work, but the prerequisite editor doesn't seem to offer the option to check if a registry entry/value exists -- only registry keys. Is it really not possible to do so? Thanks in advance.

Regards,
Infopar
Labels (1)
0 Kudos
(3) Replies
Janardhan_R
Level 2 Flexeran
Level 2 Flexeran

If you are looking at installing a specific version of SQL Server based on its non-existance on the target system for your setup, you can use the SQL Server prereqs available by default in Redistributables view of InstallSheild. If you want to customize on your own and include it then, conditions in prerequsiste editor provides you an option to check for a Key or a Key value or evena specific range of value.
see http://helpnet.flexerasoftware.com/installshield19helplib/default.htm
0 Kudos
infopar
Level 3

Hello, Janardhan R,

Thanks for the response. Yes, I'm aware of the prerequisite editor and, in fact, that's what I was talking about in my original post. I'm trying to determine if any SQL Server version is installed on the target system. Now, as the screenshot attached to your post shows, there are 3 possible types of registry search for a condition:

- checking if a registry key does(n't) exist: under this mode, I could check for example if there is a HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server key on the target system's registry, but that's not very effective -- this key could be there with no SQL Server instances installed. I've tried to find a specific key, common to SQL Server 2000 and later versions, that would be present on the registry if any SQL Server instance was installed, but no such luck so far.

- checking if a registry entry has a specific version value: under this mode, selected on your screenshot, I could check to see if a specific SQL Server version is installed. But, as I said earlier, I'm looking to determine if any version is installed; using this mode, I would have to add conditions for every SQL Server version there is, which is not very feasible.

- checking if a registry entry has a specified value: under this mode, I could check for a registry entry that is common to all potentially installed SQL Server versions of my interest. Now, it would seem that the registry entry InstalledInstances under the key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server is only present if any SQL Server instance is installed. So I tried messing with this option to check if the InstalledInstances entry value on the target system was equal to "no value" (empty input), hoping that this perhaps could be interpreted as an absence of the registry entry on the target system and would somehow evaluate to true. Unfortunately, it seems the condition is not evaluated if the registry entry is not found. In other words, what I was really looking for is a "checking if a registry entry does(n't) exist".

That being said, I would like to know if there is any other reasonable/common way to determine if there is any SQL Server version installed on the target system for installing a prerequisite. Thanks in advance.

Regards,
Infopar
0 Kudos
infopar
Level 3

Hello,

Any chance someone might have tried to do something similar, at least...?

Regards,
Infopar
0 Kudos