Setup: Pin to Taskbar

PeerZero
edited January 2022 in Browser

Unfortunately Microsoft makes the 'pin to taskbar' really complicated to do programmatically. They likely make it difficult to prevent every application spaming the task bar. On Stackoverflow there are a bunch of different techniques described which all work only on specific Windows OSes, some only for older Windows 10 versions.

We'll keep track of this here.

Windows 10: XML Method (admin only)

The official way is todo it via XML files described here: https://docs.microsoft.com/en-us/windows/configuration/configure-windows-10-taskbar

Starting in Windows 10, version 1607, administrators can pin additional apps to the taskbar and remove default pinned apps from the taskbar by adding a <TaskbarLayout> section to a layout modification XML file.

Windows 8.1

Via https://stackoverflow.com/questions/31720595/pin-program-to-taskbar-using-ps-in-windows-10

$shell = new-object -com "Shell.Application"  
$folder = $shell.Namespace((Join-Path $env:SystemRoot System32\WindowsPowerShell\v1.0))
$item = $folder.Parsename('powershell_ise.exe')
$item.invokeverb('taskbarpin');

Windows 7

https://docs.microsoft.com/en-us/archive/blogs/deploymentguys/pin-items-to-the-start-menu-or-windows-7-taskbar-via-script

Windows 10 and 11: Modify registry Taskband

  1. Add link to %AppData%\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar
  2. Change the binary keys of Favorites and FavoritesResolve in HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Taskband

Binary encoding of those keys are TBD.

This will likely require a reboot or killing and restarting explorer.exe?


Others

More methods will be described later on.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!