Deploy a customized Windows 11 Taskbar that allows users to change the pinned apps (Revised Version)

This is a revised version of the old post I made on how to pin apps to the Taskbar and allow users to change it. The old post uses import of reg files and some users had issues with.

You can find the old post here

Creating your Taskbar

We will create a LayoutModification.xml file based on the Microsoft Documentation
To make this easy I have an example template that you can modify with the applications you want to pin to the taskbar.

LayoutModification Sample

Download Sample

<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="windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel" />
				<taskbar:DesktopApp DesktopApplicationID="Microsoft.Windows.Explorer"/>
				<taskbar:DesktopApp DesktopApplicationID="Chrome"/>
				<taskbar:DesktopApp DesktopApplicationLinkPath="%ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs\Accessories\Windows Media Player Legacy.lnk"/>
				<taskbar:UWA AppUserModelID="MicrosoftCorporationII.QuickAssist_8wekyb3d8bbwe!App" />
			</taskbar:TaskbarPinList>
		</defaultlayout:TaskbarLayout>
	</CustomTaskbarLayoutCollection>
</LayoutModificationTemplate>

In the sample I have included pinned application for each type, all you have to do is edit the sample and add the applications you want to pin, I will explain how to get AppID or lnk files etc the easiest way below.

For example in the sample file I have Google Chrome pinned:
<taskbar:DesktopApp DesktopApplicationID=”Chrome”/>

If you wanted to replace this with Microsoft Edge we simply change the DesktopApplicationID to: <taskbar:DesktopApp DesktopApplicationID=”MSEdge”/>

Understanding different application types

To build our new taskbar we will need to understand the difference applications “types” that we can pin to the taskbar.

We have three types of applications that we can pin

UWA (Universal Windows Application)
Applications that are a part of the Universal Windows Platform

DesktopApp with AppID
Lets call this "Modern Apps" they have the benefit that it will support badge notifications taskbar grouping.

DesktopApp with DesktopApplicationLinkPath
We can call this legacy application or win32 apps that does not have a AppID.

We need to know the three types because depending on what type of applications you want to pin we need to set an AppID or an link to the .lnk file etc.

How to find the AppID or lnk location for the apps

As mentioned before we have three types, i will make this short and easy.

Find all UWA apps and ID’s

  • Open PowerShell and run: Get-AppxPackage -AllUsers | Select PackageFullName, Name
  • The list will display all the UWA apps available on your system, if you want to pin a UWA app then copy the PackageFullName for example: Microsoft.GetHelp_10.2403.20861.0_x64__8wekyb3d8bbwe
  • To pin a UWA app we add the following in our LayoutModification.xml file.
    <taskbar:UWA AppUserModelID=”Microsoft.GetHelp_10.2403.20861.0_x64__8wekyb3d8bbwe”/>
Display all UWA apps to pin on taskbar

Find all DesktopApps with an AppID (Modern apps)

  • Open PowerShell and run: Get-StartApps
  • The list will display all apps with an AppID
    (It also displays UWA apps, for adding UWA apps only use the UWA steps)
  • To pin a DesktopApp with an AppID, copy the AppID for example: Chrome
    Now lets add it to the LayoutModification.xml file.
    <taskbar:DesktopApp DesktopApplicationID=”Chrome”/>
Display all DesktopApps to pin on taskbar

DesktopApp with DesktopApplicationLinkPath

  • Open Explorer and go to:
    %ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs\
  • Any application here you can link to the .lnk file and pin it to the taskbar.
  • In the sample file I linked to the old Media Player:
    <taskbar:DesktopApp DesktopApplicationLinkPath=”%ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs\Accessories\Windows Media Player Legacy.lnk”/>

Deploy LayoutModification using Intune

Now that you have constructed your LayoutModification file we want to package it and deploy it to our users.

Make sure all apps you pin are installed on the system

To do this we need to create a simple CMD file to copy the file over to the location we want it.

Create a CMD copy file

Download premade file here.

@echo off
copy /Y "%~dp0LayoutModification.xml" "C:\Users\Default\AppData\Local\Microsoft\Windows\Shell\"

The cmd file copies the LayoutModifcation.xml over to the Default users folder, this will allow for the taskbar to be set on all users that login to the machine, and the user are free to pin or unpin apps.

Packaging the files as a Win32 application

We will use the Microsoft Win32 Content Prep Tool to package the files.

  • Create a new folder and place your LayoutModification.xml and the CMD file (taskbar.cmd) in the new folder.
  • Start the Microsoft Win32 Content Prep Tool as Administrator.
  • Select the location where stored your files.
  • Specify the setup file: taskbar.cmd
  • Select the folder where you want the output.
  • The file .intunewin will contain all the files you had in the folder.
Win32 content prep tool

Deploy the package using Intune

Go to Intune and select Apps, Add a new Win32-based app.

  • Add the package that we just created taskbar.intunewin
  • Add a name, description, Publisher, Version etc.

Program Settings

Install command: taskbar.cmd
Install behavior: System

Intune edit application install commands

Requirements

Intune app install requirements for Win32 app

Detection rules

Rule format: Manually configure detection rules.
Rule type: File
Path: C:\Users\Default\AppData\Local\Microsoft\Windows\Shell\
File or folder: LayoutModification.xml
Detection method: File or folder exists

Intune detection rules for Win32app taskbar

Assign the application to USERS, if you want to assign this to Device groups then you have to modify the detection rule or it will fail during OOBE due to No User exists. You can also turn the cmd file into PowerShell script and write in the registry once a successful copy have been done and use that a detection rule. For more information on detection rules during OOBE and UserProfiles I can recommend call4Cloud blog by Rudy Rooms

Extra helpful during building and testing your Taskbar

If you want to test out the LayoutModification file before you deploy it then i written some useful tips below.

  • Manually copy your LayoutModification.xml to the Default user location.
    C:\Users\Default\AppData\Local\Microsoft\Windows\Shell\
  • Open RegEdit and delete the Taskband
    HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Taskband
  • Run PoweShell to restart Explorer:
    Stop-Process -Name explorer -Force
    Start-Process explorer

You can repeat the steps above every time you change your LayoutModification.xml file, this way you instantly see how the taskbar will look before you package it.

If you do not delete the Registry folder “Taskband” then the taskbar will contain manually pinned or old items.

References

https://learn.microsoft.com/en-us/windows/configuration/taskbar/pinned-apps?tabs=ppkg&pivots=windows-11

https://learn.microsoft.com/en-us/windows/configuration/start/layout?tabs=intune-10%2Cintune-11&pivots=windows-11#start-layout-example

https://learn.microsoft.com/en-us/windows/configuration/start/layout?tabs=intune-10%2Cintune-11&pivots=windows-11#start-layout-example

0 0 votes
Article Rating
Subscribe
Notify of
guest

20 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Bob
Bob
3 months ago

Hey there, thanks for this. I’ve just tested it out everything works users are able to pin extra apps that persist even after a restart / stop-process explorer.exe
However, it seems that removing apps that were named within the XML
If you end explorer or restart the device would come back on.
Would you know of a way to let the modified user selection stay persisted even on removal of default apps?

John
John
3 months ago

Hello,

Thank you for your procedure. Unfortunately for me it doesn’t work. The file is copied to the right place but no icon is added.

John
John
Reply to  Everything365
3 months ago

Hello,
Thank you for your reply. Yes, that’s exactly what I did.
I have the enterprise version, so I don’t know if that could be an explanation.

I’ve also installed all the updates for Windows 11. 

Dan
Dan
Reply to  Everything365
12 days ago

I’m on Windows 11 Enterprise 24H2 and it doesn’t seem to work – even using your sample without modifying anything.

Gonz
Gonz
3 months ago

I attempted to follow the guide provided, but unfortunately I do not have a registry key for ”Taskband” under the current user hive. I used the sample layout modification file with some adjustments, but apps are still not pinning to the taskbar.
I attempted this on a newly imaged machine with no changes made to the OS (Win 11 23H2). I’ve also tried logging in with multiple accounts, none of which have the custom taskbar applied.

Jules
Jules
2 months ago

Thank you so much for putting this together.One issue here, setting this as required by all users would have an org wide effect. We don’t want taskbar initialization to happen outside of ESP/AP/OOBE – is it possible to have a detection rule that instead of a user scope, is a device scope so we could ensure that devices already shipped out are not configured by this application?

Arnaud
Arnaud
29 days ago

hello,
i do confirm that everything which is pushed by the xml file will come back if a user unpinned it.
so i tried a different way to do that (with Intune) and i got something working like i wanted : the configuration is pushed one time and doesn’t apply anymore after that, so the user is totally free of unpinning whatever he wants… BUT i got a new behavior after that (which i absolutely don’t understand) : the user cannot pin any apps to the start menu .. the ”pin to start” doesn’t even exist anymore when he does a right click …
I’m doing something regarding the taskbar and now this is the start menu which is doing something weird… what the hell Microsoft ?
I don’t get why it is so complicated to just ”pre”personnalize a taskbar on a system.
thanks for that tutorial in any case ! it is really well explained.

Dan
Dan
12 days ago

Hmm, I’m doing everything listed (think the “Extra helpful during building and testing your Taskbar” section could be moved earlier to “Testing out the changes” or something so people know you can test before all the other steps).

In my tests, the taskbar doesn’t change at all – not even with Edge and File explorer the ones that seem to be pretty standard. I’m currently on Windows 11 24H2 so not sure if it’s changed in this version but for such a simple request this is a pain in the ass from Microsoft’s perspective.

Thanks either way!

Charles
Charles
Reply to  Everything365
7 days ago

Just want to add that I have to the same issue too! 24H2 as well.

ironpot
ironpot
Reply to  Everything365
6 days ago

This method no longer works with 24H2