So currently I am working on an Government Education site comprising of just under 40 schools. There was a requirement to remove/hide Microsoft’s Edge browser from the image being rolled out to the users. The reasoning behind this is down to a monitoring tool used by the education department that does not support Edge and therefor policies would be broken…
Anyway I hunted around on our favourite resource for a solution that would not break the image entirely by removing one of it core features.
Eventually I found these 4 registry keys that did the trick:
KEY: HKEY_LOCAL_MACHINE\NewOS\Microsoft\Windows\CurrentVersion\Explorer Name: DisableEdgeDesktopShortcutCreation Value: 1
KEY: HKEY_LOCAL_MACHINE\NewOS\Policies\Microsoft\MicrosoftEdge\Main Name: PreventFirstRunPage Value: 1
KEY: HKEY_LOCAL_MACHINE\NewOS\Policies\Microsoft\MicrosoftEdge\Main Name: AllowPrelaunch Value: 0
KEY: HKEY_LOCAL_MACHINE\NewOS\Policies\Microsoft\MicrosoftEdge\TabPreloader\AllowTabPreloading Name: AllowTabPreloading Value: 0
Next was to figure out how to inject these into my reference image before it was laid onto the VM for automated customisation. So I remembered a great script by Johan Arwidmark I use all the time for turning off Appx package updates during a reference image capture task sequence (can break sysprep if allowed).
Anyway after a bit of modification to load the Software registry hive offline instead this is what I came up with. There is also some commented out portions here that may come in handy:
Github: Config-Win10-Offline-UE.wsf
MDT Setup
- First download the script and save it into you deployment share “Scripts” folder:
J:\<YOUR_DEPLOYMENT_SHARE>\Scripts\Config-Win10-Offline-UE.wsf
- Then Open up your chosen Task Sequence in MDT and just before the “Inject Drivers” step under the “Post Install Group” and a new “Run Commmand Line Step”.
- Name it for example: Configure User Experience
Then use the following command line:
cscript.exe "%SCRIPTROOT%\Config-Win10-Offline-UE.wsf"
Example:
SCCM Setup
- For SCCM you must be using the MDT integration (if you’re not… Start now!), you can make it work without it but I will not cover that here.
- Find your current MDT Toolkit Package that is associated with the Task Sequence you would like to configure power settings in.
- Open the “Source” location of your toolkit package, then open the scripts folder.
- Once inside the scripts folder copy the “Config-Win10-Offline-UE.wsf” into it. Now, update the Package in ConfigMgr.
- Next we need to add the step to the task sequence. It must go after a “Use Toolkit Package” step and before your Driver injection step in the task sequence. (If you have a reboot remember to add another use “Toolkit package”.)
Create a new “Run Command Line Step” and add the below command.
cscript.exe "%deployroot%\scripts\Config-Win10-Offline-UE.wsf"
And that is it. Your ConfigMgr or MDT Task sequence is now setup to configure the user environment before the machine boots!
Anyway as always, script is provided as is and if you do mod it, there is a line to add your name.
Thank you !
No problem 🙂
Cheers,
SCCMOG