Click here to Skip to main content
15,867,568 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm trying to pin an exe to TaskBar in Windows 10. But I'm not able to find verb for pin/unpin to taskbar.
I have tried the same code on windows 7 and 8.1 machine, its working fine, but its not working on windows 10 machine.

So my question is whether is it possible at all?
I have found one application syspin, it does pinning to taskbar, so I think it would be possible.
I cannot find any verb to pin to taskbar.
Is this a MS bug?I'm using Windows 10 pro 64 bit machine.

What I have tried:

VB
Dim ShellApp, Desktop
    ShellApp = CreateObject("Shell.
    Desktop = ShellApp.NameSpace("C:\Windows\System32").Parsename("notepad.exe").invokeverb("taskbarpin")


Its working fine on windows 7 and 8.1 machine.
Posted
Updated 24-Feb-16 23:49pm
v2
Comments
dan!sh 25-Feb-16 5:51am    
Have you check this MS bug ID: click here
vivek nuna 25-Feb-16 5:55am    
I checked it, none of the solution is working fine. people are suggesting to use syspin tool, but I dont want to use any external tool, I need to write my own program.
Richard Deeming 25-Feb-16 9:09am    
You missed the important comment, which one user received from MS support:

"The items that are pinned to the Start menu or taskbar is a user preference. Applications should not be overriding the user’s preferences. In the long term, programmatically pinning items to the taskbar or Start menu in Windows 10 will not be supported. Only the user will be able to pin items."
vivek nuna 25-Feb-16 13:24pm    
But some of the tools can pin applications to taskbar it means that this feature is still present in windows 10.
DaveAuld 25-Feb-16 6:10am    
Have a read of this and the associated link managed approach at the bottom. http://www.pinvoke.net/default.aspx/shell32/ITaskbarList.html

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900