/build/static/layout/Breadcrumb_cap_w.png

Software Deployment Question


Why we should not place HKLM and HKCU keys in same component (as per the component rules) What is the reason behind it?

08/05/2016 1182 views
One of the component rules is "HKLM & HKCU should not be together" in application repackaging. What is the logic behind it.Please Explain.
0 Comments   [ + ] Show comments

Comments


All Answers

1
From past experience this ends up with the MSI exploding and causing physical damage to the PC, especially the registry...  :D

The reason is due to to HKCU and HKLM machine paths being in different places (think multi user PC's). You don't want Windows Installer repairing the HKLM every time if finds something missing in the HKCU - remember the component will contain registry and files.

*thats if you have the KeyPath set in the HKCU space.

There's probably a better answer which you can read up on MSDN.

Basicly, just don't do it.
Answered 08/07/2016 by: rileyz
Red Belt

1

If your component has HKLM and HKCU keys one of them (but only one) will be the key path.

If it is the HKLM key then after the s/w is installed HKLM and HKCU keys will be set but the HKCU key is only set for the person who installed the app. When another user (not the installer) starts the app the test on the key file will cause the writing of the HKCU key to be skipped as the HKLM key already exists.

If the HKCU key is the key path then each time a user starts the app for the first time, the HKCU key which is the key path doesn't exist so it and the HKLM key will get re-written causing a UAC activation if that user isn't an admin. It's a problem where an admin installs software for a non-admin user and it breaks ICE57.

Answered 08/09/2016 by: olditguy
Second Degree Blue Belt

0

agree with both of the above answers.

You need to keep machine and user stuff separately. Its just one of the rules.

Its a very similar reason as to why a component with a user file has to have a key path of an HKCU.

 

Answered 08/14/2016 by: Badger
Red Belt

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ