Does anyone have a Fixlet that does removes the IE shortcut from taskbar for all user and default?
Created relevance to find IE on Taskbar:
/* IE Shortcut on Taskbar */exists it whose (it contains “Internet Explorer.lnk”) of (unique values of node values of selects “/LayoutModificationTemplate/CustomTaskbarLayoutCollection/defaultlayout:TaskbarLayout/taskbar:TaskbarPinList/taskbar:DesktopApp/@DesktopApplicationLinkPath” of it) of xml documents of files “LayoutModification.xml” of folders “\AppData\Local\Microsoft\Windows\Shell” of (folders of folder “C:\Users”)
This relevance finds IE added by user and IE on taskbar by LayoutModification xml:
/* IE Shortcut on Taskbar /exists it whose (it as lowercase contains “internet explorer.lnk” as lowercase) of (unique values of node values of selects “/LayoutModificationTemplate/CustomTaskbarLayoutCollection/defaultlayout:TaskbarLayout/taskbar:TaskbarPinList/taskbar:DesktopApp/@DesktopApplicationLinkPath” of it) of xml documents of files “LayoutModification.xml” of folders “\AppData\Local\Microsoft\Windows\Shell” of (folders of folder “C:\Users”) or / User Shortcut */ exists file “\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar\internet explorer.lnk” of folders of folder “C:\Users”
This is the action script to remove user added as replacing IE on taskbar with Edge. It updates the default user as well so it won’t come back:
// Remove IE from LayoutModificationTemplate xml
// Disable wow64 redirection on x64 OSes
action uses wow64 redirection {not x64 of operating system}
delete __createfile
// CREATEFILE
createfile until END_OF_FILE
$node = $null
$Edge = $null
$files = Get-Item -Path “C:\Users*\AppData\Local\Microsoft\Windows\Shell\LayoutModification.xml” -Force
foreach ($file in $files) {{
$xml = [xml](Get-Content $file -Force)
#Remove IE Shortcut
$Test = $null
$Test = $xml.LayoutModificationTemplate.CustomTaskbarLayoutCollection.TaskbarLayout.TaskbarPinList.DesktopApp | Where-Object DesktopApplicationLinkPath -Match "internet explorer.lnk"
if ($Test) {{
$node = $xml.LayoutModificationTemplate.CustomTaskbarLayoutCollection.TaskbarLayout.TaskbarPinList.DesktopApp | Where-Object DesktopApplicationLinkPath -Match “internet explorer.lnk”
$node.ParentNode.RemoveChild($node)
}
#Build Edge shortcut XML
$Test = $null
$Test = $xml.LayoutModificationTemplate.CustomTaskbarLayoutCollection.TaskbarLayout.TaskbarPinList.UWA | Where-Object AppUserModelID -Match "MicrosoftEdge_8wekyb3d8bbwe!MicrosoftEdge"
if (!$Test) {{
$Edge = $xml.CreateElement(“taskbar:UWA”,“http://schemas.microsoft.com/Start/2014/TaskbarLayout”)
$xml.LayoutModificationTemplate.CustomTaskbarLayoutCollection.TaskbarLayout.TaskbarPinList.AppendChild($Edge).SetAttribute(“AppUserModelID”,“Microsoft.MicrosoftEdge_8wekyb3d8bbwe!MicrosoftEdge”)
}
$xml.Save($file)
}
#Remove possible taskband that might exist
$DefaultFolders = (Get-ChildItem -Path C:\Users | Where-Object {{$_ -match “Default”}).FullName
foreach ($DefaultFolder in $DefaultFolders) {{
reg load “hku\ZZZ” "$DefaultFolder\NTUSER.DAT"
reg delete “HKEY_USERS\ZZZ\Software\Microsoft\Windows\CurrentVersion\Explorer\Taskband” /F
reg unload “hku\ZZZ”
}
#Remove user added IE Shortcuts
Remove-Item -Path "C:\Users*\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar\internet explorer.lnk"
END_OF_FILE
//For running
delete powershell.ps1
copy __createfile powershell.ps1
waithidden { pathname of file ((it as string) of value “Path” of key “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\ShellIds\Microsoft.PowerShell” of native registry) } -ExecutionPolicy Bypass -File powershell.ps1