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: enumerating registry keys?
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
‎Sep 11, 2008
03:16 PM
enumerating registry keys?
As a custom step in my install, I want to determine if certain hardware is present on the target computer. To do this, I need to enumerate the registry keys located at:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002bE10318} and determine the value of the "DriverDesc" sub key, searching for specific text.
My installer is a Basic MSI Project. What is the best way to enumerate and search the registry keys?
Thanks,
Don Metzler
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002bE10318} and determine the value of the "DriverDesc" sub key, searching for specific text.
My installer is a Basic MSI Project. What is the best way to enumerate and search the registry keys?
Thanks,
Don Metzler
(3) Replies
‎Sep 11, 2008
06:57 PM
dmetzler wrote:
As a custom step in my install, I want to determine if certain hardware is present on the target computer. To do this, I need to enumerate the registry keys located at:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002bE10318} and determine the value of the "DriverDesc" sub key, searching for specific text.
I have successfully done this in a custom DLL.
Now I would like to exit the install if my DLL function returns a FALSE value. How can a custom action be modified to allow the installation to exit based on a return value from calling a custom DLL?
Thanks,
Don
‎Sep 12, 2008
08:35 AM
If you have set up your dll as a Windows Installer dll, you can set a property in it to indicate failure, then create a type 19 custom action to run afterwards if that property is set.
‎Sep 12, 2008
08:39 AM
You could also have the DLL return ERROR_INSTALL_FAILURE to trigger the exit; that's not as flexible as Kathy's solution, though, for displaying a custom message.