Windows 10 Customizations during OSD

Updated 11/30/2015 – Remove Default Apps Section – Disable New Apps Auto Install in Windows 10 Update 1511

Updated 6/7/2016 – Added more info about Lock Screen Wallpaper replacement.
Update 11/8/2016 – More Lock Screen Info

This is a collection of “Tweaks” I make to our Windows 10 deployments to improve user experience and do branding.  I’ll admit upfront that most of these ideas are not original to me, I’ve borrowed and adapted several things for my own needs.  When possible, I post a link to the blog post that helped me.  I hope you find useful this compilation of Tweaks. (Download of scripts / files used are at bottom)
– Please Note, if you try to copy / paste some scripts from this page, the “quote” marks typically get messed up and would need to be fixed… or just use the scripts in the download

First things, I’ve got a “OSDWindows10Scripts” package, with several subfolders that I keep all of the customizations in, which I can then reference during OSD.
I’m going to go through them folder by folder to explain which each does and how it’s used in the Task Sequence.

DefaultAppAssoc (Change Default Applications for Extensions)
This Customization was developed by Johan
Info taken from: http://deploymentresearch.com/Research/Post/507/Setting-Internet-Explorer-as-your-default-browser-in-Windows-10-during-OS-Deployment
Currently I used this to set .PDF to Adobe Reader (Instead of Edge) and make Internet Explorer as the Default browser.

In the TS, it looks like this:
Dism.exe /online /Import-DefaultAppAssociations:DefaultAppAssoc\Win10DefaultAppAssoc.xml

 

Desktop WallPaper (Set the Default WallPaper)
Info taken From: http://ccmexec.com/2015/08/replacing-default-wallpaper-in-windows-10-using-scriptmdtsccm/
nothing fancy here, we’re just over writing the default Windows Wallpaper image with our own.

cmd.exe /c DesktopWallpaper\Load_DefaultWallPaper.cmd

 

LockScreen (Sets the LockScreen Image)
Update 6/7/16 – You can also do this via group policy – info HERE
Update 11/8/16 – Using this method below, in 1607 will prevent users from changing it themselves. – Added Second Method that will still allow users to change their Lock Screen Image.

Originally Adapted from: http://www.ohmancorp.com/RefWin-windows8-change-pre-login-screen-background.asp

Load_LockScreen.cmd:

—–
REM Copy Wallpaper locally
xcopy LockScreen\LockWall.jpg C:\Cabs\LockWallpaper\ /Y /S

REM Import Registry Key to set the background
reg import LockScreen\LockScreenWallpaper.reg
reg import LockScreen\LockScreenWallpaper.reg /reg:64
—–

Registry File:
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Personalization]
“LockScreenImage”=”C:\\Cabs\\LockWallpaper\\LockWall.jpg”
—–

As you can see, all that happens is the LockScreen WallPaper is copied local, and a registry setting points to it.

EDIT: 6/7/2016 – Working on new post to cover disabling those Tool Tips in OSD.  Did not have any luck with Group Policy disabling it.
More info: https://technet.microsoft.com/en-us/itpro/windows/whats-new/windows-spotlight
EDIT: 11/8/2016 Added Method 2
LockScreen Method 2, sets the lock screen you want, but still allows users to change lock screen image in settings

image

Those two image files that you select, will replace two of the files here: C:\Windows\Web\Screen
img100.jpg is the default, but if you want to add any other corporate branded pictures, you can just add them to your list of files to copy.
image

Script: – One line per picture: xcopy LockScreen\img100.jpg C:\Windows\Web\Screen\ /Q /Y

image

 

 

MyComputerDesktopIcon (Adds the “My Computer” Icon to the Desktop)

MyComputerIcon.reg
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel]
“{20D04FE0-3AEA-1069-A2D8-08002B30309D}”=dword:00000000

 

 

MyComputerNameIcon (Changes the Name of “My Computer” to the actual name of the PC)
You can see an Example lower down in the “Windows10ExplorerTweaks” Section

This has been handy, so users have an easier time finding their computer names when contacting support, We just tell them to look on their desktop, and the Icon for “My Computer” actually says “Computer Name = %COMPUTERNAME%”
Script File (Load_ComputerName.cmd)
MyComputerNameIcon\setacl.exe -on “HKCR\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}” -ot reg -actn setowner -ownr “n:Administrators”
MyComputerNameIcon\SetACL.exe -on “HKCR\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}” -ot reg -actn ace -ace “n:Administrators;p:full”
MyComputerNameIcon\SetACL.exe -on “HKCR\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}” -ot reg -actn ace -ace “n:SYSTEM;p:full”
reg import MyComputerNameIcon\ComputerName.reg /reg:64

ComputerName.reg:
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}]
“LocalizedString”=hex(2):43,00,6f,00,6d,00,70,00,75,00,74,00,65,00,72,00,20,00,\
4e,00,61,00,6d,00,65,00,3a,00,20,00,20,00,25,00,43,00,4f,00,4d,00,50,00,55,\
00,54,00,45,00,52,00,4e,00,41,00,4d,00,45,00,25,00,00,00

 

 

OneDriveRemoveShellFolder (Removes the OneDrive Folder on the Left Pane in Explorer)
Update 04/21/2016 – Updated Info about OneDrive – New Post here: http://garytown.com/onedrive-disable-hide-in-windows-10

Idea adapted from: http://www.tenforums.com/tutorials/4818-onedrive-add-remove-navigation-pane-windows-10-a.html

I don’t actually use these files, but keep them for documentation.

 

 

RemoveDefaultApps (Remove MOST of the Win 10 Default Apps, but leaves what we wanted, Calc, Alarms, Weather, Maps)
Adapted from: http://blogs.technet.com/b/mniehaus/archive/2015/11/11/removing-windows-10-in-box-apps-during-a-task-sequence.aspx

Edit 6/7/16 – Found this recently, another great way to do it: http://www.scconfigmgr.com/2016/03/01/remove-built-in-apps-when-creating-a-windows-10-reference-image/

Script: —–

<#

************************************************************************************************************

Purpose: Remove built in apps specified in list

Pre-Reqs: Windows 10

************************************************************************************************************

#>

#—————————————————————————————————————

# Main Routine

#—————————————————————————————————————

# Get log path. Will log to Task Sequence log folder if the script is running in a Task Sequence

# Otherwise log to \windows\temp

try

{

$tsenv = New-Object -COMObject Microsoft.SMS.TSEnvironment

$logPath = $tsenv.Value(“LogPath”)

}

catch

{

Write-Host “This script is not running in a task sequence”

$logPath = $env:windir + “\temp”

}

$logFile = “$logPath\$($myInvocation.MyCommand).log”

# Start logging

Start-Transcript $logFile

Write-Host “Logging to $logFile”

# List of Applications that will be removed

$AppsList =”Microsoft.XboxGameCallableUI”,”Microsoft.XboxIdentityProvider”,”Windows.ContactSupport”,”microsoft.windowscommunicationsapps”,”Microsoft.BingNews”,”Microsoft.Getstarted”,”Microsoft.BingFinance”,”Microsoft.XboxApp”,”Microsoft.SkypeApp”,”Microsoft.ZuneVideo”,”Microsoft.ZuneMusic”,”Microsoft.WindowsPhone”,”Microsoft.People”,”Microsoft.Office.OneNote”,”Microsoft.MicrosoftSolitaireCollection”,”Microsoft.MicrosoftOfficeHub”,”Microsoft.BingSports”,”Microsoft.3DBuilder”,”Microsoft.WindowsFeedback”

ForEach ($App in $AppsList){

$Packages = Get-AppxPackage | Where-Object {$_.Name -eq $App}

if ($Packages -ne $null)

{

Write-Host “Removing Appx Package: $App”

foreach ($Package in $Packages)

{

Remove-AppxPackage -package $Package.PackageFullName

}

}

else

{

Write-Host “Unable to find package: $App”

}

$ProvisionedPackage = Get-AppxProvisionedPackage -online | Where-Object {$_.displayName -eq $App}

if ($ProvisionedPackage -ne $null)

{

Write-Host “Removing Appx Provisioned Package: $App”

remove-AppxProvisionedPackage -online -packagename $ProvisionedPackage.PackageName

}

else

{

Write-Host “Unable to find provisioned package: $App”

}

}

# Stop logging

Stop-Transcript

——

Disable Microsoft Consumer Experiences (Additional Apps Auto Installed ) Updated 11/30 – More Info: http://blogs.technet.com/b/mniehaus/archive/2015/11/23/seeing-extra-apps-turn-them-off.aspx
image

Registry File: DisableMSConsumerExperiences.reg

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\CloudContent]
“DisableWindowsConsumerFeatures”=dword:00000001

 

 

 

StartMenuShortcuts

This folder contains Pinned Site Shortcuts to frequently used Websites, or ones I want them to know about.
The Application Catalog, Google (Named Internet Explorer)
I named it Internet Explorer, to use it as an Icon in the Start Menu for IE (As IE is not able to be Pinned in Windows 10)
more info in the next Section.

In the Sample Files, I’ve changed the Application Catalog to point to MS.  Just Replace it with a Pinned Site Shortcut to your Application Catalog.

I just copy these .website files into the Start Menu.
xcopy StartMenuShortcuts\* “%SystemDrive%\ProgramData\Microsoft\Windows\Start Menu\Programs” /Q /Y /I

 

 

StartScreenTiles (Create Custom Start Menu)

Info taken from: https://technet.microsoft.com/en-us/library/dn283401%28v=wps.630%29.aspx

On your reference Machine, configure the Start Menu how you would like it to be (Note, Internet Explorer 11 will not Stay Pinned to your Start Menu, I’ve created a Workaround by using an IE pinned Shortcut file called Internet Explorer.website that I copy into the Program Menu during OSD) (Last Section)

Once you’ve created your Start Menu how you like:

Elevated Powershell
Export-StartLayout -Path “c:\CMSource\StartMenuLayout.bin” (Then Copy that .bin file to your Package)

In my folder structure, I have a couple of different versions, my main one is v2, but if I have to make changes for new applications, I’ll add v3.  It’s nice to have version controls. (v1 had office 2013 instead of office 2016, so If I deploy a machine with Office 2013, I can use a variable to use v1 startmenu with Office 2013 shortcuts instead)

During OSD, just use a Powershell command to import the Start Menu: powershell.exe Import-StartLayout -LayoutPath StartScreenTiles\v2\StartMenuLayout.bin -MountPath C:\

 

 

UserPictures (This will replace the default user.png file with whatever corporate one you want)

This I did because of Branding, our Communication Department provided me with the .png logo files, which I then had to modify to look good in Windows 10 “Profile CIRCLE” they use.  Because it’s a CIRCLE, it would cut off the edges, so I used Paint.NET to increase the Canvas Size so when Windows trims the edges to fit the CIRCLE window, it doesn’t cut off any of the logo.

Once it enlarges the Canvas, you’ll have to Delete the “White Space”

 

Once you have your Company Logos Created, you can then use a simple copy command.
xcopy UserPictures\* “%SystemDrive%\ProgramData\Microsoft\User Account Pictures” /Q /Y /I

 

Windows 10 Explorer Tweaks (Cleans up Explorer, sets the “Launch To”)
Idea adapted from here: http://www.tenforums.com/tutorials/6015-pc-folders-add-remove-windows-10-a.html

This will clean up Explorer, goes straight to this, instead of using the Quick Access view.

I then use a separate Step in the TS to import Each Key:

 

RegFiles: (You can download them from the Site too: http://www.tenforums.com/tutorials/6015-pc-folders-add-remove-windows-10-a.html)
LaunchTo.reg
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
“LaunchTo”=dword:00000001

—-
64-bit_Remove_Music_Folder_in_This_PC.reg
Windows Registry Editor Version 5.00

; Created by: Shawn Brink
; http://www.tenforums.com
; Tutorial: http://www.tenforums.com/tutorials/6015-pc-folders-add-remove-windows-10-a.html
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{a0c69a99-21c8-4671-8703-7934162fcf1d}\PropertyBag]
“ThisPCPolicy”=”Hide”

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{a0c69a99-21c8-4671-8703-7934162fcf1d}\PropertyBag]
“ThisPCPolicy”=”Hide”

—–
64-bit_Remove_Pictures_Folder_in_This_PC.reg
Windows Registry Editor Version 5.00

; Created by: Shawn Brink
; http://www.tenforums.com
; Tutorial: http://www.tenforums.com/tutorials/6015-pc-folders-add-remove-windows-10-a.html
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{0ddd015d-b06c-45d5-8c4c-f59713854639}\PropertyBag]
“ThisPCPolicy”=”Hide”

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{0ddd015d-b06c-45d5-8c4c-f59713854639}\PropertyBag]
“ThisPCPolicy”=”Hide”

—–
64-bit_Remove_Videos_Folder_in_This_PC.reg
Windows Registry Editor Version 5.00

; Created by: Shawn Brink
; http://www.tenforums.com
; Tutorial: http://www.tenforums.com/tutorials/6015-pc-folders-add-remove-windows-10-a.html
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{35286a68-3c57-41a1-bbb1-0eae73d76c95}\PropertyBag]
“ThisPCPolicy”=”Hide”

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{35286a68-3c57-41a1-bbb1-0eae73d76c95}\PropertyBag]
“ThisPCPolicy”=”Hide”

—-

 

I hope you find this useful, if you have any comments, improvements, give me a shout out on Twitter @gwblok
Download the OSDWindows10Scripts Folder here: http://garytown.com/Downloads/OSDWindows10Scripts.zip