win10下如何用程序方式把程序图标固定到任务栏(pin taskbar)

hik_zxw 2016-06-15 08:47:56
ShellExecuteW(NULL, L"taskbarpin", L"C:\....\test.lnk", NULL, NULL, 0);

在win7win8下,上面的语句即可实现将程序图标固定到任务栏。但在win10下不起作用。
在win10下有没有办法通过程序的方式将程序图标固定到任务栏呢?

想到一个办法,就是模拟右键菜单中“将程序固定到任务栏”的功能,但不会实现。
...全文
2330 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
O_OX_XO_O 2018-09-05
  • 打赏
  • 举报
回复
用vbs 可以。https://download.csdn.net/download/q14531212/10648225
天行者pxhero 2016-07-18
  • 打赏
  • 举报
回复
win10 不在提供入口让应用程序在任务栏或者开始菜单落图标了。 Have just recieved this reply 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." So it is no longer supported to pin/unpin items in the taskbar.... We will now to make a request for change the enable programmatic pinning and unpinning of programs in the Enterprise edition of Windows 10, and/or using group policies.
FASM_FASM 2016-06-17
  • 打赏
  • 举报
回复


就是个注册表的操作,跟C++毫无关系。任何语言能操作注册表就行。
hik_zxw 2016-06-16
  • 打赏
  • 举报
回复
引用 1 楼 FASM_FASM 的回复:
win10下确实有这个问题,解决方式看: http://connect.microsoft.com/PowerShell/feedbackdetail/view/1609288/pin-to-taskbar-no-longer-working-in-windows-10
没有看懂是怎么解决的。 如何以C++的方式来实现呢? 请指点。
FASM_FASM 2016-06-16
  • 打赏
  • 举报
回复
win10下确实有这个问题,解决方式看: http://connect.microsoft.com/PowerShell/feedbackdetail/view/1609288/pin-to-taskbar-no-longer-working-in-windows-10

1,221

社区成员

发帖
与我相关
我的任务
社区描述
C++ Builder Windows SDK/API
社区管理员
  • Windows SDK/API社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧