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
<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”/>
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”/>
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
@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.
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
Requirements
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
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.
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?
I will look at this, thinking the registry Taskband or the xml file needs some adjustment. There is also the possibilty of looking into the file named TaskBarCloudDefaultLayout.xml or adjust the xml if possible, i will need to look into this and test it out more.
One way would be to delete the LayoutModification file after its been applied to the user account maybe.
And thank you for commenting with feedback
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.
Hi John, are you using the sample file provided and are you running this test?
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
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.
That is very weird, I cannot replicate this issue, i just run Win 11 23H2 and everything works.
Have you tried the old post to see the Taskband reg modify works for you? I will try to replicate this issue next week so if you find any more details please let me know.
I’m on Windows 11 Enterprise 24H2 and it doesn’t seem to work – even using your sample without modifying anything.
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.
Taskband will be present on all Windows release, I myself use the same image you do.
Make sure the files are in the right location, and test it out manually on one device.
Manually open registry and brows to Taskband, this is available on all windows versions.
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?
I will look into this but hopping 24h2 will introduce new settings but will rebuild it later
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.
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!
Thank you for the input, i will move the section and test on 24H2 next week to see if something changed or is no longer working.
Just want to add that I have to the same issue too! 24H2 as well.
Does anything change for you if you do the manual steps with the provided sample file?
This method no longer works with 24H2
Does anything change for you if you do the manual steps with the provided sample file?
I just did the manual steps on brand new 24H2 installation, no issue.
Can you try with my provided sample file and let me know your results based on that.
It seems broken for now in 24H2, what does work however is to configure your Taskbar on a device, export the Registry Taskband, then import this, restart Explroer and the new Taskbar icons show. I will do some more testing later on when I have time.