I have the TS setting the registry keys in the HKEY_Local_Machine no problem.

My issue is that I want to, by default, set a key for the HKEY_Current_User. I want to have the "Automatically detect settings" in Internet Properties LAN settings unchecked, for anyone logging in.

I think that the correct key is

Computer\HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Connections\DefaultConnectionSettings

but as it is in the Current User I am finding it hard to have it set by default, through the OSDeploy TS. Want it set by default for a no-touch build of all our machines.

Any help would be appreciated.


Generally speaking this is more something you would control by a GPO than OSD but technically it is no problem.

What you have to do is modify the default user profile, i.e. the template from which all future profiles are created. The most basic way (and by far not the worst) to do this is using the built in tool REG.EXE First load the default user profile like this:

reg load "hku\Default" "C:\Users\Default\NTUSER.DAT" 

Next modify your key (binary data should be entered without spaces or seperator as the /d parameter):

reg add HKU\default\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Connections /v DefaultConnectionSettings /t REG_BINARY /d 460000... /f

Finally unload the hive

reg unload "hku\Default"

The biggest problem here is probably that you have got a binary key which is a little rough to manage.

You could work around this by loading the default user profile on a running machine (in the same location hku\default) with regedit. Then navigate to your path, modify the key and export it into a reg file. Then you could use

reg import <path to regfile>

in place of reg add.

Whichever way you find better, put those steps in a simple cmd and run with run command line during osd. In theory you could even do it directly in your reference image and thus bypass the need to do it during OSD at all. I would personally advise against such things however as this always means that a change in this setting is a complete rebuild of the reference image.

  • Thanks, I thought that it might be a default change but had no clue how. I've been asked to take as much as I can from GPO and into SCCM to put it all into one manageable place. Agree on the reference image comment, keeping everything (within reason) off there so changes are only to the task sequence – user001 Jun 12 '18 at 9:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.