[Solved] NTLite - How to apply HKEY_CURRENT_USER registry tweaks post installation?

Kjell

Member
I've got reg files which references to HKEY_CURRENT_USER that I'd like to apply post installation / to user created in unattended config, I've tried adding the files to:
  • Registry
  • Post-Setup

However, the changes aren't applied to the user which is automatically created in my Unattended configuration for Windows 11.
Is there any other way of doing this?
 
Last edited:
Solution
Changing this to "HKEY_USERS\.DEFAULT\Software\Classes\CLSID" would work in Registry tab.
Read both of my answers.
I've already tried that if you check #2 comment :)

However, I just tried again with updated NTLite (2.3.0.8396 -> 2.3.1.8454) and I've used the updated base ISO (Win11_English_x64 -> Win11_English_x64v1) from Microsoft and it looks like HKEY_CURRENT_USER works as expected now in registry tab :cool:!

I've also noticed that HKEY_CURRENT_USER automatically adds a entry for default user, I'm not sure if that happened before but nonetheless I believe it's working as intended now
Screenshot_3.png
I've also tried replacing HKEY_CURRENT_USER with:
  • HKEY_USERS\.DEFAULT - No effect (the registry setting is not applied)
  • HKLM\DEFAULT - '[50] The request is not supported'
  • HKCU - '[50] The request is not supported'
  • HKEY_LOCAL_MACHINE\DEFAULT - '[50] The request is not supported'
There's also a right-hand side menu for modifying 'User - Default' under Registry tab in NTLite but this approach doesn't add anything to the registry queue

Maybe nuhi has any insights?
 
post your reg entry, preset, build number etc so others can test. also instead of opening thread for each issue. use one thread and number your issues like 1) 2) 3)
 
I've got reg files which references to HKEY_CURRENT_USER that I'd like to apply post installation / to user created in unattended config, I've tried adding the files to:
  • Registry
  • Post-Setup
HKCU applied to Registry has no meaning, because when it's integrated into the image -- no users exist. OOBE pass creates the current user. HKEY_USERS\.DEFAULT will be inherited by all users on first logon.

HKCU applied to Post-Setup, runs after OOBE and should be ordered before other actions.

My point is the order it gets loaded will determine whether your action takes effect.
 
HKCU applied to Registry has no meaning, because when it's integrated into the image -- no users exist. OOBE pass creates the current user. HKEY_USERS\.DEFAULT will be inherited by all users on first logon.

HKCU applied to Post-Setup, runs after OOBE and should be ordered before other actions.

My point is the order it gets loaded will determine whether your action takes effect.
Could there be any difference in adding the regs as single files instead of by folder.
I see in this NTlite update:


May 20, 2021​

2.1.1.7917

NEW​

Integrate: Package, Driver and Registry directory subscription functionality (Add – Directory – Subscribe)
(Useful for a more dynamic presets, directory location dictates which items to queue on refresh)

-----------------------------------
After that by adding the reggies by folder it seems NTLITE make it work or could it' be because i Audit/ sysprep/ copyprofile my installs?
Just after install i notized there's always a DefaultUser profile until a restart is done - The DefaultUser profile is created during OOBE before the first Account is created as i understand.
 
Could there be any difference in adding the regs as single files instead of by folder.
I see in this NTlite update:

May 20, 2021​

2.1.1.7917

NEW​

Integrate: Package, Driver and Registry directory subscription functionality (Add – Directory – Subscribe)
(Useful for a more dynamic presets, directory location dictates which items to queue on refresh)

The subscribe feature is not well explained. It simply does "scan my user folder for files to include", instead of you entering them by hand.
There's no difference from asking NTLite to integrate multiple files in the same pass.

Just after install i notized there's always a DefaultUser profile until a restart is done - The DefaultUser profile is created during OOBE before the first Account is created as i understand.

OOBE will create Administrator, DefaultUser and your local account. Accounts don't have a SID (security identifier) until creation, as it's randomly hashed. You can only assign user reg keys to a SID. Therefore the default settings live in HKEY_USERS\.DEFAULT, and get propogated out.

Load a clean image into NTLite. Open regedit and look under HKLM\NLTmp* ..
This is what Windows looks like before OOBE runs.
 
Load a clean image into NTLite. Open regedit and look under HKLM\NLTmp* ..
This is what Windows looks like before OOBE runs.
Done that before via (NTLite_HKEY_LOCAL_MACHINENLTmp~XXX~USERHIVE50) - but to much effort achieving the same thing as the upper mentioned NTL update make it possible from left panel. Still all my HKCU's works when using unattended to /audit for copy/ profile (gives meaning for me as i use more than one PC/ laptop). Haven't tested creating a admin user via Unattended and use that image directly to boot.
 
if an image already has the administrator account folder how do i load the registry and apply files for the admin, load its dat file?
hmm, i want to put HKCU tweaks into a mounted image for the administrator account only.
 
Last edited:
if an image already has the administrator account folder how do i load the registry and apply files for the admin, load its dat file?
hmm, i want to put HKCU tweaks into a mounted image for the administrator account only.

HKCU is just a shorthand for which user is currently logged on. The lazy answer is log on as Administrator, "reg import HKCU.reg".
But that's not what you wanted. "reg load HKU\Administrator NTUSER.DAT" -- except the path is now HKU\Administrator.

This means you got to argggggghhh replace HKCU with HKU\username everywhere in the registry file. Registry paths are absolute, not relative.

[insert Clanger :mad: cartoon here]
 
just use notepad/2's "replace" function.

hold on, clean iso dont have users/administrator, have to use HKEY_USERS\.DEFAULT then.
righto, got all that, thank you :)
 
You had a valid question. I might want my Administrator profile (if ever needed) to be untouched by defaults. And when sysprepping, the Admin account is usually provisioned by then.
 
ive found sysprep to be cranky, dont restart as required then the bugger fails :mad: so i normally get to 1st logon(admin), update - restart where required then sysprep.
 
Last edited:
post your reg entry, preset, build number etc so others can test. also instead of opening thread for each issue. use one thread and number your issues like 1) 2) 3)
For reference, here's the registry file
It works if I run it manually post installation, but not if I do it in NTLite :(

Code:
[HKEY_CURRENT_USER\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}]
@=""

[HKEY_CURRENT_USER\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32]
@=""
 
Changing this to "HKEY_USERS\.DEFAULT\Software\Classes\CLSID" would work in Registry tab.
Read both of my answers.
 
Changing this to "HKEY_USERS\.DEFAULT\Software\Classes\CLSID" would work in Registry tab.
Read both of my answers.
I've already tried that if you check #2 comment :)

However, I just tried again with updated NTLite (2.3.0.8396 -> 2.3.1.8454) and I've used the updated base ISO (Win11_English_x64 -> Win11_English_x64v1) from Microsoft and it looks like HKEY_CURRENT_USER works as expected now in registry tab :cool:!

I've also noticed that HKEY_CURRENT_USER automatically adds a entry for default user, I'm not sure if that happened before but nonetheless I believe it's working as intended now
Screenshot_3.png
 
Solution
Back
Top