(Solved) How can we add HKCU regs via Setupcomplete.cmd

HKCU keys are seamlessly integrated into the defaultuser ntuser.dat file by ntlite whenever you add them using the built in add to registry key. Those keys are then automatically duplicated to all users during setup and account creation.
With regards to manually adding them, what you do is- you manually copy out the ntuser.dat hive from the defaultuser account folder when the image is mounted, manually mount it in regedit on the host, write in your edits, and then unload the hive and paste it back into the image over the old ntuser.dat.
 
HKCU keys are seamlessly integrated into the defaultuser ntuser.dat file by ntlite whenever you add them using the built in add to registry key. Those keys are then automatically duplicated to all users during setup and account creation.
Yes. I ended up with a setupcomplete solution because NTlite couldn’t handle accents chars in reg files encoded in UTF-16 little endian. This bug may have been fixed since then in 1.7.2.6680.

With regards to manually adding them, what you do is- you manually copy out the ntuser.dat hive from the defaultuser account folder when the image is mounted, manually mount it in regedit on the host, write in your edits, and then unload the hive and paste it back into the image over the old ntuser.dat.
Exactly. I will post an setupcomplete.cmd sample with the required commands for that.
 
can u show me how to add hkcu regs? nuhi freMea
Add the .REG file to the Integrate - Registry page, it supports HKCU, will add it to all users.
If it doesn't work, let me know which.
Or it's important not to be set before setupcomplete?

Yes. I ended up with a setupcomplete solution because NTlite couldn’t handle accents chars in reg files encoded in UTF-16 little endian.
May I please get an example?

Thanks.
 
Last edited:
May I please get an example?

Back in the time, such key resulted bad char formatting in shell menu. It should be ok now.

Code:
Windows Registry Editor Version 5.00
; encoded in UTF-16 little endian
; ; =======================================================
; Add Open PS ADMIN to selected folder
[HKEY_CLASSES_ROOT\Directory\shell\OpenElevatedPS]
@="Ouvrir la fenêtre PowerShell ici [ADMIN]"
"Icon"="powershell.exe"
"HasLUAShield"=""
"Extended"=""
 
Back
Top