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
- :
- Re: Registry searching and retrieving values
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
‎Apr 30, 2008
02:09 PM
Registry searching and retrieving values
I'm new to InstallShield...
I'm wondering... can I tell installshield to search a branch of the registry and all its values until it finds a pair of values or a value.
then use that value (which is info to modify another part of the registry) to go to another part of the registry and modify it's values.
(the OS randomly creates registry branch names and keys when i install the device so i need it to search one part to find a value that leads to the other)
so in short.. I'm wondering how do I point to a branch of the registry and find a value... then take another value out of that same branch that leads it to another value in a totally different branch...
is this possible and what kind of template and settings do i need to use and start out with?
I'm wondering... can I tell installshield to search a branch of the registry and all its values until it finds a pair of values or a value.
then use that value (which is info to modify another part of the registry) to go to another part of the registry and modify it's values.
(the OS randomly creates registry branch names and keys when i install the device so i need it to search one part to find a value that leads to the other)
so in short.. I'm wondering how do I point to a branch of the registry and find a value... then take another value out of that same branch that leads it to another value in a totally different branch...
is this possible and what kind of template and settings do i need to use and start out with?
(7) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 30, 2008
02:51 PM
MSI's built in AppSearch/RegLocator pattern doesn't support recursive searches. You would have to write a custom action to find your data. Once found and stored in a property, the Registry table can be used to record that data to another registry key/value.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 30, 2008
06:50 PM
Okay so how do i go about accomplishing this and writing my own function to do this?
what do i need to do that?
(keep in mind i'm completely new but i've worked a little bit with other installer software such as installer vise and Wise for Windows Installer)
what do i need to do that?
(keep in mind i'm completely new but i've worked a little bit with other installer software such as installer vise and Wise for Windows Installer)
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 30, 2008
08:43 PM
That's a tall order to explain, espcially without knowing your programming background. First pick a language.... C++, InstallScript, VBScript
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 30, 2008
08:55 PM
I'll pick C++ and InstallScript...
though... wouldnt installer scripting be better for writing functions for an installer? (since it's the company's language for the product)
though... wouldnt installer scripting be better for writing functions for an installer? (since it's the company's language for the product)
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 30, 2008
09:24 PM
They all have their ups and downs. C++ is going to take the most amount of work, require external tools and wiring and a more complicated debugging story. But it'll also be very small and likely bullet proof and portable to other vendor tools.
InstallScript will add about 1.5mb to the package ( scripting runtime ), be alot easiest to develop with less plumbing, a very high degree of reliability, not very portable and an easy debugging story.
VBScript would be very easy to develop, require little plumbing but be several orders of magnatiude less reliable with a horrible debugging story.
Since you mentioned C++ and InstallScript... have you coded in either before? Are you familiar with the concept of recursion?
InstallScript will add about 1.5mb to the package ( scripting runtime ), be alot easiest to develop with less plumbing, a very high degree of reliability, not very portable and an easy debugging story.
VBScript would be very easy to develop, require little plumbing but be several orders of magnatiude less reliable with a horrible debugging story.
Since you mentioned C++ and InstallScript... have you coded in either before? Are you familiar with the concept of recursion?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 30, 2008
09:30 PM
I'm in the process of learning C++ but i havent mastered it...
so InstallScript probably would be the way to go for now.
and no i'm not really familiar with recursion.. although i'm sure i will get to it eventually in the learning process.
so InstallScript probably would be the way to go for now.
and no i'm not really familiar with recursion.. although i'm sure i will get to it eventually in the learning process.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 30, 2008
09:38 PM
Are you familiar with recursion? If so, you'll need ( atleast ) these InstallScript functions
RegDBSetDefaultRoot
RegDBQueryKey ()
RegDBGetKeyValueEx
finally... MsiSetProperty()
The concept is you have a function that takes a Key as an argument. Examines that key for the value you are looking for and if it finds it, calls MsiSetProperty and exists the CA.
If it doesn't find it, it enumerates the subkeys for that key and the recursively calls itself to repeat the whole process of each of those keys.
In this way you `walk` the registry tree until you either a) find what you are looking for or b) exhaust the search.
Wire the CA up as immeadiate execution in both the UI and Execute sequence conditioned to execute only once. Assign it to a PUBLIC (caps) proeprty and put that property in the SecureCustomProperties property.
RegDBSetDefaultRoot
RegDBQueryKey ()
RegDBGetKeyValueEx
finally... MsiSetProperty()
The concept is you have a function that takes a Key as an argument. Examines that key for the value you are looking for and if it finds it, calls MsiSetProperty and exists the CA.
If it doesn't find it, it enumerates the subkeys for that key and the recursively calls itself to repeat the whole process of each of those keys.
In this way you `walk` the registry tree until you either a) find what you are looking for or b) exhaust the search.
Wire the CA up as immeadiate execution in both the UI and Execute sequence conditioned to execute only once. Assign it to a PUBLIC (caps) proeprty and put that property in the SecureCustomProperties property.
![](/skins/images/A5EADE085F77DE82FB3B14D6B307AE6A/responsive_peak/images/icon_anonymous_message.png)