Table of contents
TOC
Collapse the table of content
Expand the table of content

Customize the taskbar

Last Updated: 12/12/2016

You can pin up to three additional apps to the taskbar by adding a taskbar layout modification file, for example, TaskbarLayoutModification.xml. You can specify different taskbar configurations based on SKU, device locale, or region.

Note The filename “TaskbarLayoutModification.xml” is not required, you can choose any name you like. The important things are that the registry key is set to the path of mounted location of the xml file.

This file is similar to the file used to customize the Start menu, LayoutModification.xml.

There are two ways of adding pins:

  • Use a shortcut (.lnk) file. Example:

    DesktopApp 
    DesktopApplicationLinkPath="%ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs\Accessories\Paint.lnk"
    
  • Use a UWA app user model ID. Example:

    UWA AppUserModelID="Microsoft.Windows.Photos_8wekyb3d8bbwe!App"
    

    For left-to-right languages, the taskbar icons are ordered from left to right. For right-to-left languages, the taskbar icons are ordered from right to left (the rightmost element is Start).

  • Start

  • Search
  • Task view
  • Windows-provided pins
  • OEM pins

You cannot remove or replace the Windows-provided pins or Start, Search, or Task view. You are, however, able to add up to three additional pinned apps to the taskbar.

There are eight steps to customize the taskbar with up to three additional pinned apps:

  1. Create the shortcuts to your apps.

    We recommend storing the shortcut .lnk files in the All Users Start menu For example:

    %ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs\Fabrikam\Application.lnk

  2. Create a TaskbarLayoutModification.xml file that includes the pins. Here is an example of the xml you’d add to the TaskbarLayoutModification.xml to add three pinned apps.

    <?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>
            <defaultlayout:TaskbarLayout>
                <taskbar:TaskbarPinList>
                    <taskbar:DesktopApp DesktopApplicationLinkPath="%APPDATA%\Microsoft\Windows\Start Menu\Programs\Accessories\Internet Explorer.lnk" />
                    <taskbar:DesktopApp DesktopApplicationLinkPath="%ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs\Accessories\Paint.lnk" />
                    <taskbar:UWA AppUserModelID="Microsoft.Windows.Photos_8wekyb3d8bbwe!App" />
                </taskbar:TaskbarPinList>
            </defaultlayout:TaskbarLayout>
        </CustomTaskbarLayoutCollection>
    </LayoutModificationTemplate>
    
  3. Mount your Windows image, and add your TaskbarLayoutModification.xml file to the image. For example, add (or replace) the file:

    C:\Mount\Windows\Users\Default\AppData\Local\Microsoft\Windows\Shell\TaskbarLayoutModification.xml

  4. Create a registry key (.reg) file that includes the key:

    “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\LayoutXMLPath”, and save it in the image.

    1. Put the path of the mounted TaskbarLayoutModification.xml file as the registry key’s value, for example, %AppData%\Local\Microsoft\Windows\Shell\TaskbarLayoutModification.xml.
    2. Add this file to the image.
  5. Prepare to run this registry key by adding a FirstLogonCommands in an Unattend file.

  6. Add the Unattend file to the image.
  7. Unmount the image.
  8. Apply and boot the image.

    TaskbarLayoutModification.xml is applied during Sysprep. After Sysprep processes the file, it is moved to %AppData%\Local\Microsoft\Windows\Shell\. During OOBE, the tray creates an instance of ITaskbarLayoutPolicyManager and determines whether the TaskbarLayoutModification.xml is present and is well formed. If not, Windows checks for pins in the Unattend setting:TaskbarLinks. If neither exist, no new pins are added. If the TaskbarLayoutModification.xml is valid, Windows adds the pins to the taskbar.

Note Note: If the taskbar detects registry keys that map to default pins (the pre-Windows 10, version 1607 method of pinning apps to the taskbar), and it also detects app pinning by using TaskbarLayoutModification.xml, only TaskbarLayoutModification.xml pinning will be applied. If, however, no TaskbarLayoutModification.xml file exists, the legacy method will be applied. The legacy method is deprecated in Windows 10, version 1607, and may not be supported in future versions of Windows. We recommend this new approach, adding a TaskbarLayoutModification.xml file.

Send comments about this topic to Microsoft

© 2017 Microsoft