D
D
Dmitry2016-03-24 17:34:24
Windows
Dmitry, 2016-03-24 17:34:24

How to programmatically pin a shortcut to the taskbar under Windows 10?

There is a task - to fix the shortcut in the taskbar.
Under Win7, the solution is quite simple:

ShellExecute(NULL, L"taskbarpin", pathToLnk, NULL, NULL, 0);

But under 10, such code leads to the launch of a shortcut, instead of pinning it to the taskbar.
A cursory and not very googling showed that this functionality was blocked, because "the user himself must kick, and there is nothing for him to clog the bar."
And one could calm down on this, but the infamous Amiga browser can attach its shortcuts to both Windows 7, Windows 8, and Windows 10 - so it’s somehow possible.
Actually, that's the question - how?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry, 2016-03-25
@N1ghtroad

Rubric asked himself - answered himself.
In short: under the current Win10 - no way. SyavaSyava is right.
And now in more detail:
I checked the Amiga under a virtual machine, I rolled the OS there and, of course, did not bother with updates. And there amigo fixes labels. So does chromium, and chrome, and even my code using ShellExecute taskbarpin.
Still, as an option, some powershell recommend.
And MS blocked this possibility with the next update. With what, unfortunately, I will not say - it's lazy to search.

E
Ezhyg, 2016-03-24
@Ezhyg

Alternatively, place the shortcut in the folder:
C:\Users\User_Name\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar
(actually, shortcuts of regular applications pinned to the taskbar are placed there)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question