Is there a way to automatically add custom HKEY_CURRENT_USER reg keys for new users?

0

Windows 7

I have a third-party software application that requires a custom key/value to be added under HKEY_CURRENT_USER\FOO\FOO2\FOO3\. This presents a problem for brand new users whoe share the same system since their default HKCU setup won't have this custom key. Is there an easy way to tell Windows to add a certain key to HKCU for all users?

I understand that HKEY_LOCAL_MACHINE is intended for these types of "global" keys but the software app doesn't support that. It needs to find it under HKEY_CURRENT_USER.

Is a logon script the only option here?

Mike B

Posted 2015-02-23T23:26:57.153

Reputation: 2 308

Answers

1

If you want to do it for all new users in the future, and it’s the same value (data) for all,

  • Create a dummy user (let’s call it bekim).
  • Login as bekim,
    • insert the desired key/value(s) with Registry Editor (regedit) or red add,
    • and logout.
  • As Administrator, with “Hide protected operating system files” unchecked, copy \users\bekim\NTUSER.DAT to \users\Default\NTUSER.DAT.  (You should probably backup the old version first.)

G-Man Says 'Reinstate Monica'

Posted 2015-02-23T23:26:57.153

Reputation: 6 509

1Wouldn't that replace the default-user file (and everything it contains), with what is in the bekim file? – fixer1234 – 2015-02-24T04:07:48.417

Well, yes; that's the point. It's my understanding that the NTUSER.DAT file of a newly created user will be a copy of \users\Default\NTUSER.DAT – so, after logging in to the newly created user for the very first time, and making one configuration/settings change, \users\bekim\NTUSER.DAT will be a copy of \users\Default\NTUSER.DAT plus that one change. – G-Man Says 'Reinstate Monica' – 2015-02-26T09:06:35.477

A "well, duh!" moment. Not being a network guy, I've probably misunderstood the purpose of the default user since Windows first came out. My understanding had been that the default user was common, baseline settings that apply to all users, and the individual user profiles supplement that. So, the overlap never made sense for that explanation. It finally makes sense. Definitely +1 material. And congrats on passing 2K. – fixer1234 – 2015-02-26T13:38:22.290

@fixer1234: Thank you. (And Woo Hoo!) – G-Man Says 'Reinstate Monica' – 2015-02-26T17:16:47.220