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

Updating HKLM and HKCU

I am creating a setup for an Excel Addin. It has a custom action to

1. add to HKLM to prepare Active Setup for other users
2. add to HKCU to activate the addin for the current (installing) user.

If I run the setup as administrator, the HKLM part works, but the HKCU updates the administrators registry and not the current user's registry.

If I run the setup without elevation, the HKCU part works but th HKLM part fails, as it is unable to write to HKLM.

How can I resolve this problem?

Thanks!
0 Kudos
(8) Replies
maurice
Level 3

*bump*

I'd be really grateful if someone could give me a reply on this

Thanks!
0 Kudos
maurice
Level 3

Thanks, but my question was not how to write to HKLM *OR* HKCU, but how to write to HKLM *AND* HKCU.

Active Setup works fine and it's the path I (grudgingly) took because I couldn't find an installer that was capable of updating HKLM and HKCU during the install.

From your answer, it seems that InstallShield suffers the same limitation as the MSI installer, and thus cannot help me. A shame, as I am certainly not the first to have this problem.
0 Kudos
Lenwin
Level 10

Hi,

In a premier edition of InstallShield there is an option to advertise the shortcut and associate the registry entry to a particular component.

When the setup is installed as administrator it will advertised the shortcut icon on all users desktop. When logged into the user profile and clicked on the shortcut the associated registry entry will be populated.

Here the registry entry can be created under every user's HKCU hive and in HKLM for admin.

Could you let us know if this is the feature you are looking for.

Regards,
Lenwin
0 Kudos
maurice
Level 3

Thank you for the follow-up.

In essence, you solution seems to be a manual equivalent to Active Setup, for the registry to be modified, users must click a desktop icon. My need is for a fully automated solution.

It's funny that such a simple need cannot be addressed.
0 Kudos
Lenwin
Level 10

Hi,

Could you provide us a brief description of your requirement so that we can let you know if this can be achieved through InstallShield.

Regards,
Lenwin
0 Kudos
maurice
Level 3

I need a setup which will allow me to update both HKLM *and* HKCU of the current user running the install, without any other action required by the user.

If the installing user doesn't have admin privilege, the install shall elevate with the classic 'do you want to let this program modify your computer settings' message.

In other words, the setup needs to run the HKLM update portion with elevated privilege and the HKCU update with normal privilege. Obviously, both updates need to be done when the install is completing, not during the pre-requisite stage.

Note that trying to change HKCU with elevated privilege changes the HKCU of the *administrator*, not the HKCU of the user running the install, this is the problem.
0 Kudos
Lenwin
Level 10

Hi,

Could you kindly let us know if you have tried the per-user installation context.

Per user Installation can be performed by setting the ALLUSERS property to a value empty string ("").

The value of the ALLUSERS property can be set in the General Information view.

Regards,
Lenwin
0 Kudos