cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
lsramos
Level 3

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
Labels (1)
0 Kudos
(2) Replies
tglynx
Level 6

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
0 Kudos
lsramos
Level 3

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
0 Kudos