0

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.

VB Code:

Dim ShellApp, Desktop
    ShellApp = CreateObject("Shell.Application")
    Desktop = ShellApp.NameSpace("C:\ProgramData\ABC.exe").Parsename("ABC.exe").invokeverb("taskbarpin")

1 Answers1

1

This issue was reported already (see also SO question).

And one possible solution (on the same page, re-posting it here):

Posted by Misha Rudiy on 11/5/2015 at 7:30 AM

For new OS installs you can still pin to the taskbar via the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\TBDEn registry key.

Example: In an SCCM Task Sequence, I have a batch script that runs after the "Setup Windows and Configuration Manager" step that basically contains reg-adds.

Syntax (REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\TBDEn" /v SBOEM0 /t REG_EXPAND_SZ /d "%%ALLUSERSPROFILE%%\Microsoft\Windows\Start Menu\Programs\Mozilla Firefox.lnk" /f)

You can add additional links by adding values and incrementing SBOEM0 to SBOEM1 etc.

Thanks to Wayne Ye http://www.codeproject.com/Articles/185512/Programmatically-PIN-shortcut-onto-Taskbar-on-Win7.aspx for pointing this method out back in 2011.

Somethings to note, there seems to be little public documentation on this. It most likely only works as a post imaging step (see my reference to SCCM), but I am not 100% sure. The above mentioned site states that it takes place during the DASH process. I wasn't able to find any documentation on how\when a DASH process works with Windows OSes. This may be information that is only privy to OEMS.

Community
  • 1
  • 1
Sinatr
  • 20,892
  • 15
  • 90
  • 319