HKEY_CURRENT_USER to HKEY_USERS: what's the difference?

Got a problem you cannot solve? Try here.
Post Reply
Dre'
Posts: 13
Joined: Tue Jun 16, 2009 1:51 am

HKEY_CURRENT_USER to HKEY_USERS: what's the difference?

Post by Dre' »

Hi, a recent change has me baffled:

Our application sets a number of IE settings with regard to trusted sites and which options to allow and disallow. These used to be set in HKEY_CURRENT_USER, but it was decided that if an administrator installs the product, all normal users of the system must have these same settings, which they didn't. Consulting the Web gave the answer that these settings should be set in HKEY_USERS to achieve the desired effect, however building a version that does this results in the attached error. The only thing changed in the script was HKEY_CURRENT_USER to HKEY_USERS for the affected keys, and the installing user is an administrator.


Any ideas?

File Attached:

untitled.bmp
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Post by MichaelNesmith »

Can you reproduce this with an empty project that writes to just one registry key?
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Post by MichaelNesmith »

BTW, the parent key you want is most probably HKEY_USER_DEFAULT.
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
Dre'
Posts: 13
Joined: Tue Jun 16, 2009 1:51 am

Post by Dre' »

Don't know yet Michael, but I'll try to figure it out today.....


Regards,

Dre'
Dre'
Posts: 13
Joined: Tue Jun 16, 2009 1:51 am

Post by Dre' »

Yes it is: I made a simple installer, with just that one key. If it should go into HKCU it works, if I change it to HKU it fails. I've zipped all relevant files for you, which should not have any links to files on my system.

Here you are.....


Dre'

File Attached:

RegistryTest.zip
Dre'
Posts: 13
Joined: Tue Jun 16, 2009 1:51 am

Post by Dre' »

Hmm, with HKEY_USER_DEFAULT it works also. Perhaps you are right about me taking the wrong type based on web info.....

But I still think it shouldn't make a difference which subsection of the registry we address. Shouldn't all of them behave similar?


Regards,


Dre'
Post Reply