0

I like to have a set of standard apps that are pinned when I install Windows, and I like to automate that (currently using syspin as I don't have a method in PowerShell). My problem is that some pinned items open integrated with the program and some do not.

e.g. here are my pinned apps. enter image description here And here is Notepad++ open, notice that the pin has disappeared as it integrates with the open program enter image description here

But, Visual Studio Code here when open, the pin is left where it is, and the open program is a separate item. I've no idea why Windows does this. Is there a way to use PowerShell to pin items to the Taskbar such that they always integrate when opening? enter image description here

YorSubs
  • 1,087

2 Answers2

0

The programs whose icons don't "integrate" are usually just different programs.

This happens when the pinned item launches a second program. The two programs might present the same icon, but the icons cannot merge, because the programs are different.

If the problem is with having two identical icons on the taskbar, you can change the icon of the pinned item.

See the article Changing Taskbar Icon for Applications on Windows 10. In my testing it was required to relaunch explorer.exe via Task Manager, by killing it and then running again using the menu File > Run new task.

harrymc
  • 498,455
0

Some applications simply do not "play nice" with being pinned to the Taskbar (some API issue), but there is a workaround. For example Notepad++ integrates easily every time, but File Explorer, Microsoft Edge, Brave, Visual Studio Code (and many others) do not.

To test this, unpin them from the Taskbar, then drag a shortcut or the executable onto the Taskbar to pin it, and for misbehaving apps, you will get duplicate icons when opening that app.

Reason 1 in this link is the cause, and applies whether I drag a shortcut or executable onto the Taskbar (i.e. proving that Reason 2 is not the cause). Some taskbar pinned icons are duplicated when an instance of the application is running

The "Temporary Solution" listed there works. "Open the program, so that you have duplicate icons, then right click the duplicate icon (the new one) and "Pin to taskbar", then right-click the original and select Unpin this program from taskbar, then there will only be one pinned item from now on."

However, I don't really regard this as a proper solution, as it's a nuisance to have to do this and as yet, sadly, I do not have a way automate a fix for this (11+ year old issue, going by the date of the linked answer). If anyone has a way in PowerShell to properly pin items, that would be appreciated (note that all answers that use this method of pinning are completely broken, none of the answers on here work since 2019. https://stackoverflow.com/questions/31720595/pin-program-to-taskbar-using-ps-in-windows-10/74205500#74205500)

YorSubs
  • 1,087