Page 1 of 1

HKEY_CURRENT_USER to HKEY_USERS: what's the difference?

Posted: Mon Jul 13, 2009 6:29 am
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

Posted: Mon Jul 13, 2009 2:39 pm
by MichaelNesmith
Can you reproduce this with an empty project that writes to just one registry key?

Posted: Mon Jul 13, 2009 3:09 pm
by MichaelNesmith
BTW, the parent key you want is most probably HKEY_USER_DEFAULT.

Posted: Tue Jul 14, 2009 12:44 am
by Dre'
Don't know yet Michael, but I'll try to figure it out today.....


Regards,

Dre'

Posted: Tue Jul 14, 2009 1:01 am
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

Posted: Tue Jul 14, 2009 1:05 am
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'