/build/static/layout/Breadcrumb_cap_w.png

import info into hkey_current_user registry

Hey Guys,

Been struggling with this and looking for some help.
I want to import a .reg file info into the hkey_current_user section of the registry.
I've been doing some reading and figured out that i have to add the info to the hkey_user .default section so that when any user logs on the info gets populated into the hkey_current_user section.

so i use the script below to import the data... and it works i can the the info in the registry under hkey_user .default.
but when i logoff and logon again i do not see the info in the hkey_current_user section.
from the script i tried "\All Users\NTUSER.DAT" and "\Default users\NTUSER.DAT" paths
the info i'm trying to import is below aswell.

first time i'm trying something like this so not sure if i'm on the right path or if there is something i'm missing.
I've added a screenshot, maybe it would help more.

script:
reg load HKU\ntuser "C:\Documents and Settings\All Users\NTUSER.DAT"
reg import genesys1.reg
reg unload HKU\ntuser


reg file:

Windows Registry Editor Version 5.00

[HKEY_USERS\.DEFAULT\Software\VB and VBA Program Settings]

[HKEY_USERS\.DEFAULT\Software\VB and VBA Program Settings\StarterApp]

[HKEY_USERS\.DEFAULT\Software\VB and VBA Program Settings\StarterApp\Agent]
"AgentID"="3004"
"AgentPassword"=""

[HKEY_USERS\.DEFAULT\Software\VB and VBA Program Settings\StarterApp\Connection]
"UseConfigServer"="False"
"TServerHost"="10.11.1.100"
"TServerPort"="3000"
"ConfigServerHost"=""
"ConfigServerPort"=""
"ConfigServerUsername"=""
"ConfigServerUserPassword"=""
"ConfigServerApplication"="StarterApp"

[HKEY_USERS\.DEFAULT\Software\VB and VBA Program Settings\StarterApp\Data]
"KeyNumber"="0"

[HKEY_USERS\.DEFAULT\Software\VB and VBA Program Settings\StarterApp\Dn]
"DnNumber"="1"
"Dn1.Dn"="3004"
"Dn1.Type"="1"
"Dn1.Queue"=""
"Dn1.ViewLogin"="True"
"Dn1.ViewReady"="True"
"Dn1.ViewDND"="False"

[HKEY_USERS\.DEFAULT\Software\VB and VBA Program Settings\StarterApp\Preference]
"Lines"="0"
"PreviewDialing"="False"
"ViewTransfer"="True"
"ViewConference"="False"
"ViewForward"="False"
"ViewKeyPad"="True"
"ViewUserEvent"="False"
"RestoreWindowsPosition"="False"
"AutoConnect"="False"
"AutoRegister"="False"

0 Comments   [ + ] Show comments

Answers (6)

Posted by: tocatech 12 years ago
Yellow Belt
0
i
Posted by: pjgeutjens 12 years ago
Red Belt
0
it's a common misconception that hkey_users_default data gets copied into each user's registry hive when they logon to a machine. This is actually the 'profile' of the LocalSystem account, used by any application that runs under these credentials.

As for modifying the ntuser.dat files, these only get used when NEW profiles get created on the machine, so existing profiles are not impacted.

What you are trying to do is, in a pure Windows environment (as in, not through an MSI), best accomplished using ActiveSetup. You basically create a script like the one you have that writes the HKCU registry keys and have it run once for every user that logs in through Active Setup. Another option would be Group Policy.

Rgds,

PJ
Posted by: alphabeta 12 years ago
Black Belt
0
Someone correct me if I'm wrong but I thought I read somewhere that if it is written into hkey_local_machine HKCU reads it from there.
Posted by: pjgeutjens 12 years ago
Red Belt
0
Someone correct me if I'm wrong but I thought I read somewhere that if it is written into hkey_local_machine HKCU reads it from there

That's incorrect. You might be mistaking HKCU for HKCR.
HKEY_CLASSES_ROOT is a mix of HKLM\Software\Classes and HKCU\Software\Classes

Some applications might be equally happy having their settings stored under HKCU or HKLM. This is not a golden rule to go by though. It should be tested on a case by case basis.

PJ
Posted by: anonymous_9363 12 years ago
Red Belt
0
This is actually the 'profile' of the LocalSystem accountPieter, I thought this was the hive which is used to populate profiles for new local users on a workstation.The local System account has its own hive already (HKEY_USERS\S-1-5-18)
Posted by: pjgeutjens 12 years ago
Red Belt
0
Pieter, I thought this was the hive which is used to populate profiles for new local users on a workstation.The local System account has its own hive already (HKEY_USERS\S-1-5-18)

Then I was misinformed by Google!!!
(ok, maybe it was just this site)

could be, point I was making is, don't mess around with it too much, just use active setup [;)]
we're still talking impact only on NEW user profiles anyway, so it does not cover existing profiles

I've always been abit baffled by the HKEY_USERS_DEFAULT profile. only thing I know for sure it's for is for settings that apply when no user is logged in, like numlock settings and desktop backgrounds at the logon screen.

Kr,

PJ
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
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