Setup: Pin to Taskbar
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
Windows 10 and 11: Modify registry Taskband
- Add link to
%AppData%\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar
- Change the binary keys of
Favorites
andFavoritesResolve
inHKEY_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.
Howdy, Stranger!