This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Registry Search
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 23, 2009
09:25 PM
Registry Search
Hello All,
As I understand when I do a registry search I must search a specific value or in a specific key. Is there anyway I can have the search search a specific value anywhere below a certain key like the file search function performs to a number of levels ?
It may help to understand why.
Im installing a SQL database MDF file (demonstration data included) and then using SQL Scripts to attach that database to the selected SQL Server during the installation process.
What I would like to do is to default the INSTALLDIR for the mdf files to the default data folder for the SQL server
This is where the problem occurs. There are numerous locations that the SQL Server "SQLDataRoot" key can be found in the registry dependant upon the number of SQl Server instances that have been installed to that server and also dependant upon what SQL Server version they are using.
The thought would be to search for a "SQLDataRoot" key anywhere under HKLM\Software\Microsoft and set the returned value as the INSTALLDIR.
However I cannot do this because I must specify in the system search the exact location of the SQLDataRoot key which I cannot possibly known given the variables of versions and SQL server instances.
Any suggestions ?
Any help provided would be greatly appreciated.
regards
Shaun
As I understand when I do a registry search I must search a specific value or in a specific key. Is there anyway I can have the search search a specific value anywhere below a certain key like the file search function performs to a number of levels ?
It may help to understand why.
Im installing a SQL database MDF file (demonstration data included) and then using SQL Scripts to attach that database to the selected SQL Server during the installation process.
What I would like to do is to default the INSTALLDIR for the mdf files to the default data folder for the SQL server
This is where the problem occurs. There are numerous locations that the SQL Server "SQLDataRoot" key can be found in the registry dependant upon the number of SQl Server instances that have been installed to that server and also dependant upon what SQL Server version they are using.
The thought would be to search for a "SQLDataRoot" key anywhere under HKLM\Software\Microsoft and set the returned value as the INSTALLDIR.
However I cannot do this because I must specify in the system search the exact location of the SQLDataRoot key which I cannot possibly known given the variables of versions and SQL server instances.
Any suggestions ?
Any help provided would be greatly appreciated.
regards
Shaun
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 23, 2009
10:28 PM
I'll have to defer to someone else for a specific SQL solution, but you are correct that the Windows Installer registry-search functionality does not support searching registry subkeys for a particular value.
Using an InstallScript custom action, you can repeatedly call RegDBQueryKey in a custom action to query registry subkeys, but the built-in AppSearch and related tables do not support this.
Using an InstallScript custom action, you can repeatedly call RegDBQueryKey in a custom action to query registry subkeys, but the built-in AppSearch and related tables do not support this.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 24, 2009
02:06 AM
Hello Shaun, you can set up an InstallScript Custom Action and implement the search yourself in the corresponding InstallScript function using RegDBxxx functions such as RegDBSetDefaultRoot, RegDBKeyExist and so on.
Having found the correct path, you can then set INSTALLDIR accordingly.
Eric-Paul
Having found the correct path, you can then set INSTALLDIR accordingly.
Eric-Paul