Get rid of Edge & Microsoft Store in the Taskbar

2395Charger

New Member
Hi,

im looking for a way to get rid of Microsoft Edge / Store icons in taskbar, i dont want to remove the applications.
Im Currently working on a custom Windows 11 .iso with NTLite but idk how to remove those, i tryed with removing:

DEL /F /S /Q /A "%AppData%\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar\*"
but thers still a icon on taskbar from edge, and store i cant find in that folder
1699011981027.png

On Desktop is a Microsoft Edge Link, but i dont know how to remove that too....

Someone got a solution?
 
looking for the same thing, to get rid of edge and ms store from taskbar in win11 23h2.
 
1. Copy this file to UnpinFromTaskbar.ps1 (after editing $UnpinnedList):
Code:
$UnpinnedList = @('Edge', 'Microsoft Store')

# https://github.com/Disassembler0/Win10-Initial-Setup-Script/issues/8#issue-227159084
#
$GetString = @'
    [DllImport("kernel32.dll", CharSet = CharSet.Auto)]
    public static extern IntPtr GetModuleHandle(string lpModuleName);

    [DllImport("user32.dll", CharSet = CharSet.Auto)]
    internal static extern int LoadString(IntPtr hInstance, uint uID, StringBuilder lpBuffer, int nBufferMax);

    public static string GetString(uint strId) {
        IntPtr intPtr = GetModuleHandle("shell32.dll");
        StringBuilder sb = new StringBuilder(255);
        LoadString(intPtr, strId, sb, sb.Capacity);
        return sb.ToString();
    }
'@

$string = Add-Type $GetString -PassThru -Name GetStr -Using System.Text
$UnpinFromTaskbar = $string[0]::GetString(5387)

foreach ($App in $UnpinnedList) {
    ((New-Object -Com Shell.Application).NameSpace('shell:::{4234d49b-0245-4df3-b780-3893943456e1}').Items() | ?{ $_.Name -match $App }).Verbs() | `
        ?{ $_.Name -eq $UnpinFromTaskbar } | %{ $_.DoIt(); $exec = $true }
}

2. Add this file to Post-Setup (User), with no parameters.
 
This part is for anyone who wants the long answer.

AppData folder links for Taskbar only apply to Win32 apps or folders; they don't include Edge or Store which are UWP (or Store) apps. Therefore you can't unpin by deleting files. W10 allowed you to create a default XML for your custom Start Menu and/or Taskbar layout.

Unfortunately, it never really worked for W11 22H2. :mad:

But the old fashioned method of using CLSID "verbs", like "Pin to taskbar" is supported. The scripts are well known, but all have a major flaw: you're required to translate "Pin to taskbar" into your own language. This doesn't work if English isn't your default.

I found a code example, which solves that problem by finding your local phrase.

There's also 3rd-party apps for pinning/unpinning apps: syspin & pttb - Pin To TaskBar
 
i found a another solution:
Code:
<?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 DesktopApplicationID="Microsoft.Windows.Explorer" />
        <taskbar:DesktopApp DesktopApplicationLinkPath="%APPDATA%\Microsoft\Windows\Start Menu\Programs\System Tools\Command Prompt.lnk" />
      </taskbar:TaskbarPinList>
    </defaultlayout:TaskbarLayout>
 </CustomTaskbarLayoutCollection>
</LayoutModificationTemplate>

you can get App ID´s with:
Code:
Get-StartApps

and add it into
\sources\$OEM$\$1\Users\Default\AppData\Local\Microsoft\Windows\Shell

as filename: LayoutModification.xml

With that every installed system has the own taskbar layout with possible custom taskbar pins, like Google Chrome, Word, Excel ....
Theres a another possiblity to use GPO to serve it to all clients.

tested and working under Windows 11 23H2
 
Back
Top