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: How to capture install path for Registry key
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
‎Oct 31, 2008
06:23 PM
How to capture install path for Registry key
I am trying to build an installer for a customer such that our Registry items will be stored in the correct keys within the customer's product hive.
They store their install path in HKLM\software\CompanyA in a string called InstallDir, whose value might be:
D:\EZsoft
The values we want to add to the Registry must be placed into a key which embeds the install dir name, for example:
HKLM\software\CompanyA\D:/EZsoft
that is, the string "D:/EZsoft" is the sub-key into which the new registry values will be stored.
My question is, how can I extract the install path, then convert it into a string that gets added as a sub-key? I know how to use Windows Installer Properties to do this, but can't think of a way to make such a custom string. We use InstallShield Express 2009.
If this cannot be done with ISX, is their another product that has such a capability? The installation itself will be pretty simple, once we can get the path-as-subkey problem solved.
TIA,
Scott
They store their install path in HKLM\software\CompanyA in a string called InstallDir, whose value might be:
D:\EZsoft
The values we want to add to the Registry must be placed into a key which embeds the install dir name, for example:
HKLM\software\CompanyA\D:/EZsoft
that is, the string "D:/EZsoft" is the sub-key into which the new registry values will be stored.
My question is, how can I extract the install path, then convert it into a string that gets added as a sub-key? I know how to use Windows Installer Properties to do this, but can't think of a way to make such a custom string. We use InstallShield Express 2009.
If this cannot be done with ISX, is their another product that has such a capability? The installation itself will be pretty simple, once we can get the path-as-subkey problem solved.
TIA,
Scott
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 01, 2008
05:11 AM
Hi Isramos,
as per my understanding you want to create a registry key during installation which is named by the installation directory you choose during installation.
The installation directory ist stored in the [InstallDir] string. The Problem will be, that D:\EXsoft can not be stored in the registry a s a key because '\' is not allowed there.
You described that you would convert it to D:/EZsoft ...
I would say that is not possible in ISX 2009.
You could create a custom action and pass [InstallDir] to that custom action and let the custom action write the key to the registry.
Does that help?
Regards,
Michael
as per my understanding you want to create a registry key during installation which is named by the installation directory you choose during installation.
The installation directory ist stored in the [InstallDir] string. The Problem will be, that D:\EXsoft can not be stored in the registry a s a key because '\' is not allowed there.
You described that you would convert it to D:/EZsoft ...
I would say that is not possible in ISX 2009.
You could create a custom action and pass [InstallDir] to that custom action and let the custom action write the key to the registry.
Does that help?
Regards,
Michael
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 04, 2008
02:17 PM
Michael,
Yes, that is what we want to do. The customer's software created the key with the directory path using forward slashes for the reason that you state: that keys cannot contain backslashes. It is now our task to add new items to that registry key, but to do so we have to know how to recreate the string in the key name. I was hoping for someone to have an ingenious solution to this task, but I think you are right that we will have to write a special custom action to do this.
Thanks,
Scott
Yes, that is what we want to do. The customer's software created the key with the directory path using forward slashes for the reason that you state: that keys cannot contain backslashes. It is now our task to add new items to that registry key, but to do so we have to know how to recreate the string in the key name. I was hoping for someone to have an ingenious solution to this task, but I think you are right that we will have to write a special custom action to do this.
Thanks,
Scott