Customize the Taskbar
Tip
For the Windows 10 version of this topic, see Customize the Windows 10 Taskbar
You can pin up to three additional apps to the Taskbar. You can configure Taskbar pins using one of these two methods:
TaskbarLayoutModification.XML method (recommended)
- Supports multivariant images; you can specify different sets of taskbar layouts for different regions.
- Uses a single XML file.
- Only method that allows you to add UWP apps to the taskbar.
- In the examples below, the file name "TaskbarLayoutModification.xml" is used, however, you can choose any name you like.
Classic Unattend method (still supported in Windows 10, but marked as deprecated and may not be available in future builds)
- Uses the Unattend setting: TaskbarLinks
Taskbar links and ordering
The taskbar starts with the following links: Start, Search (glyph), Task View, Widgets, and Chat plus three additional Windows-provided links: File Explorer, Edge, and Store. These pins cannot be removed or replaced.
OEMs can pin up to three additional items to the taskbar.
For left-to-right languages, the taskbar icons are ordered from left to right, and for right-to-left languages the taskbar icons are in the opposite order, with the right-most element being Start.
Author a TaskbarLayoutModification.xml file
Below is an basic example of a TaskbarLayoutModification.xml
file:
<?xml version="1.0" encoding="utf-8"?>
<LayoutModificationTemplate
xmlns="http://schemas.microsoft.com/Start/2014/LayoutModification"
xmlns:defaultlayout="http://schemas.microsoft.com/Start/2014/FullDefaultLayout"
xmlns:start="http://schemas.microsoft.com/Start/2014/StartLayout"
xmlns:taskbar="http://schemas.microsoft.com/Start/2014/TaskbarLayout"
Version="1">
<CustomTaskbarLayoutCollection PinListPlacement="Replace">
<defaultlayout:TaskbarLayout>
<taskbar:TaskbarPinList>
<taskbar:UWA AppUserModelID ="Microsoft.WindowsNotepad_8wekyb3d8bbwe!App"/>
<taskbar:UWA AppUserModelID="Microsoft.WindowsCalculator_8wekyb3d8bbwe!App" />
<taskbar:DesktopApp DesktopApplicationLinkPath="%APPDATA%\Microsoft\Windows\Start Menu\Programs\System Tools\Command Prompt.lnk"/>
</taskbar:TaskbarPinList>
</defaultlayout:TaskbarLayout>
</CustomTaskbarLayoutCollection>
</LayoutModificationTemplate>
The above example defines a default layout that has three pinned items: Notepad, the Calculator UWP app, and Command Prompt.
Adding pins to your layout
Pin Classic Windows applications or Universal Windows Apps to your Taskbar by adding up to three elements under the <taskbar:TaskbarPinList>
element:
To add a Classic Windows application, add a
<taskbar:DesktopApp>
element with aDesktopApplicationLinkPath
attribute that specifies the path to a shortcut (.lnk) file. We recommend using the same shortcut .lnk files in the All Users Start menu. Example:<taskbar:TaskbarPinList> <taskbar:DesktopApp DesktopApplicationLinkPath="%APPDATA%\Microsoft\Windows\Start Menu\Programs\System Tools\Command Prompt.lnk"/> </taskbar:TaskbarPinList>
For Universal Windows apps, add a
<Taskbar:UWA>
element with aAppUserModelID
attribute that specifies the a Universal Windows app's user model ID (AUMID). Example:<taskbar:TaskbarPinList> <taskbar:UWA AppUserModelID="Microsoft.Windows.Photos_8wekyb3d8bbwe!App"/> </taskbar:TaskbarPinList>
See Find the Application User Model ID of an installed app to learn how to find the AUMID of an installed app.
Note
Links to .url files are not supported.
Use different layouts for different regions
You can also define different layouts for different regions within the same TaskbarLayoutModification.xml file. To additional layouts for different regions, configure additional <defaultlayout:TaskbarLayout>
elements that include a Region
attribute to define the applicable region. You can use multiple region tags separated by a pipe (|
) character.
Here is an example of adding pins to the Chinese (PRC) and Chinese (Taiwan) regions:
<defaultlayout:TaskbarLayout Region="CN|TW">
Note
These regions use the second half of the language/region tags listed in Available Language Packs for Windows.
The example below shows a TaskbarLayoutModification.xml file with a default configuration, and two configurations for specific regions:
<?xml version="1.0" encoding="utf-8"?>
<LayoutModificationTemplate
xmlns="http://schemas.microsoft.com/Start/2014/LayoutModification"
xmlns:defaultlayout="http://schemas.microsoft.com/Start/2014/FullDefaultLayout"
xmlns:start="http://schemas.microsoft.com/Start/2014/StartLayout"
xmlns:taskbar="http://schemas.microsoft.com/Start/2014/TaskbarLayout"
Version="1">
<CustomTaskbarLayoutCollection PinListPlacement="Replace">
<defaultlayout:TaskbarLayout>
<taskbar:TaskbarPinList>
<taskbar:UWA AppUserModelID="Microsoft.Windows.Photos_8wekyb3d8bbwe!App" />
<taskbar:DesktopApp DesktopApplicationLinkPath="%APPDATA%\Microsoft\Windows\Start Menu\Programs\System Tools\Command Prompt.lnk"/>
</taskbar:TaskbarPinList>
</defaultlayout:TaskbarLayout>
<defaultlayout:TaskbarLayout Region="US|GB">
<taskbar:TaskbarPinList >
<taskbar:UWA AppUserModelID ="Microsoft.WindowsNotepad_8wekyb3d8bbwe!App"/>
<taskbar:UWA AppUserModelID="Microsoft.WindowsCalculator_8wekyb3d8bbwe!App" />
</taskbar:TaskbarPinList>
</defaultlayout:TaskbarLayout>
<defaultlayout:TaskbarLayout Region="CN|TW">
<taskbar:TaskbarPinList>
<taskbar:UWA AppUserModelID ="Microsoft.WindowsNotepad_8wekyb3d8bbwe!App"/>
<taskbar:UWA AppUserModelID="Microsoft.Windows.Photos_8wekyb3d8bbwe!App" />
<taskbar:DesktopApp DesktopApplicationLinkPath="%APPDATA%\Microsoft\Windows\Start Menu\Programs\System Tools\Command Prompt.lnk"/>
</taskbar:TaskbarPinList>
</defaultlayout:TaskbarLayout>
</CustomTaskbarLayoutCollection>
</LayoutModificationTemplate>
Add TaskbarLayoutModification.XML to an image
If you're using a TaskbarLayoutModification.xml files to customize your taskbar, you'll:
- Configure a registry key in your Windows image to set the default path of your TaskBarLayoutModification.xml file.
- Add the TaskBarLayoutModification.xml file to your image.
- Generalize and recapture your image.
Set a default path
To use a Taskbar Layout Modification XML file, you'll need to add a registry key (LayoutXMLPath) to the image, then generalize and recapture the image. The registry key is processed before the specialize configuration pass, so you can't add the registry key using Synchronous Commands/FirstLogonCommands unless you're planning to generalize the image afterwards.
Once the registry key is configured in your image, the other shortcut files, apps, and the Taskbar Layout Modification file itself can be changed at any time through regular imaging techniques. You can add this registry key to all your images, even if you intend to add taskbar links using the Classic Unattend method.
To set the path:
Install the Windows image to a technician computer.
After the image boots, go into audit mode by pressing CTRL+SHIFT+F3.
Add the following registry key to define a default location for the Taskbar Layout Modification file:
cmd /c reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ /v LayoutXMLPath /d C:\Windows\OEM\TaskbarLayoutModification.xml
Note
We recommend using the file location
C:\Windows\OEM\TaskbarLayoutModification.xml
because this is the default path used for Push-button reset auto-apply folders.
Add taskbarlayoutmodification.xml to your image
Now that Windows knows where to look for the file, copy your TaskbarLayoutModification.xml file into the configured location.
While still in Audit mode:
- Add a Taskbar Layout Modification file (TaskbarLayoutModification.xml) in the location you configured in the previous step, for example:
C:\Windows\OEM\TaskbarLayoutModification.xml
. - (Optional) You can also place a backup copy of your file at
C:\Recovery\AutoApply\TaskbarLayoutModification.xml
so it will be restored during a push-button reset.
Generalize and recapture your image
While still in Audit mode:
Generalize the Windows image using Sysprep:
Sysprep /generalize /oobe /shutdown
Boot to Windows PE.
Recapture the image. For example:
Dism /Capture-Image /CaptureDir:C:\ /ImageFile:c:\install-with-new-taskbar-layout.wim /Name:"Windows image with Taskbar layout"
Your image is now configured to use your TaskBarLayoutModification.xml.
How Windows parses the setting for Unattend and Taskbar Layout Modification XML
While you’re transitioning to the new method to customize the taskbar, you may end up using existing images that still include your old Unattend TaskbarLinks settings. When that happens:
- If Windows finds a valid Taskbar Layout Modification XML file, it uses the XML file, and ignores any of the Unattend taskbar settings.
- If the Taskbar Layout Modification XML file isn't found, or is invalid, Windows looks for the old Unattend TaskbarLinks settings. If it finds them, it uses them.
- If Windows can't find either a valid Taskbar Layout Modification XML file, or Unattend TaskbarLink settings, then only the Windows-provided pins and Start, Search (Glyph), Task View, Widgets, Chat, and Taskbar corner icons are shown.