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
- :
- Reading data from the registry.
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
‎Dec 18, 2008
09:05 AM
Reading data from the registry.
Hi,
I would like an installation kit to reboot if a a certain Registry Key contains a certain value. To do that, I guess I have to first read a value from the Registry.
In order to read from the Registry, I did the following:
1. I declared a public property named EXAMPLE_PROP.
2. I added a record to AppSearch table {EXAMPLE_PROP, registry_sig}
3. I added a record to RegLocator table {registry_sig, 2, Software\Microsoft\Windows NT\CurrentVersion, RegisteredOwner, 2}
I wanted to confirm that the reading actually took place, so I did the following:
4. I added a record to Registry table {Registry10, 2, SYSTEM\CurrentControlSet\Example, ExampleProp, [EXAMPLE_PROP], comp.exe, 0}
I built the installation kit, and ran it, but EXAMPLE_PROP didn't seem to get the value from the registry.
Where did I went wrong?
Thanks
I would like an installation kit to reboot if a a certain Registry Key contains a certain value. To do that, I guess I have to first read a value from the Registry.
In order to read from the Registry, I did the following:
1. I declared a public property named EXAMPLE_PROP.
2. I added a record to AppSearch table {EXAMPLE_PROP, registry_sig}
3. I added a record to RegLocator table {registry_sig, 2, Software\Microsoft\Windows NT\CurrentVersion, RegisteredOwner, 2}
I wanted to confirm that the reading actually took place, so I did the following:
4. I added a record to Registry table {Registry10, 2, SYSTEM\CurrentControlSet\Example, ExampleProp, [EXAMPLE_PROP], comp.exe, 0}
I built the installation kit, and ran it, but EXAMPLE_PROP didn't seem to get the value from the registry.
Where did I went wrong?
Thanks
(3) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 18, 2008
11:54 AM
To try to narrow the problem: If you create an MSI log file (or add [EXAMPLE_PROP] to, say, a text field on the InstallWelcome dialog box), is the property being populated?
(Using the System Search Wizard instead of populating the AppSearch and related tables directly can help avoid some errors in getting things connected...)
(Using the System Search Wizard instead of populating the AppSearch and related tables directly can help avoid some errors in getting things connected...)
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 22, 2008
04:15 AM
I got:
=== Logging started: 12/22/2008 11:49:36 ===
Action 11:49:36: INSTALL.
Action start 11:49:36: INSTALL.
Action 11:49:36: AppSearch. Searching for installed applications
Action start 11:49:36: AppSearch.
AppSearch: Property: ABCD, Signature: registry_sig
Info 1314.The specified path #0 is unavailable.
Action ended 11:50:04: AppSearch. Return value 1.
Error 1314, if that is in fact the problem, means that "A required privilege is not held by the client.".
Is there any thing I can do from within the installation exe, or must I read that Registry key from an external DLL?
Thanks
=== Logging started: 12/22/2008 11:49:36 ===
Action 11:49:36: INSTALL.
Action start 11:49:36: INSTALL.
Action 11:49:36: AppSearch. Searching for installed applications
Action start 11:49:36: AppSearch.
AppSearch: Property: ABCD, Signature: registry_sig
Info 1314.The specified path #0 is unavailable.
Action ended 11:50:04: AppSearch. Return value 1.
Error 1314, if that is in fact the problem, means that "A required privilege is not held by the client.".
Is there any thing I can do from within the installation exe, or must I read that Registry key from an external DLL?
Thanks
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 22, 2008
10:21 AM
A similar example seems to work at this end; if you view the search in the System Search view (right-click and choose Modify), does it look okay there? Does it work if you read from a different key? Delete EXAMPLE_PROP from the Property Manager?