Jump to content


How can I change a HKCU setting within Windows during an OSD deployment

Recommended Posts

you are trying to apply settings to the Current User section of the registry which won't work during a task sequence as the task sequence runs for Computers not users,

you can get around this by mounting the registry hive for the Default User, making the changes using your chosen registry file which is pointing to this mount point, then commit the changes,


what this will mean is that All new user profiles on that computer will get the change, here's an example of that for a Windows 7 deployment (you will need to adjust accordingly for Windows XP so that C:\Users becomes C:\Documents and Settings\)


Below is an example for modifying HKCU settings for Windows 7


the first step will Load the Default User registry hive into a mountpoint called Defuser using a Run Command Line step like so

cmd.exe /c reg.exe load HKEY_LOCAL_MACHINE\defuser c:\users\default\ntuser.dat

in the next step we import the Registry file in another Run Command Line step this Registry file can be a file in a package.

cmd.exe /c reg.exe import "Userprefs.reg"

the important thing here is that the registry file refers to the mountpoint referenced in our first step, below is an example of that




Are you running this while in the "boot image" or while in the "currently installed OS"?



Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...