Page 1 of 1

Pinned icons in the taskbar

Published: May 6, 2019 - 12:04 PM
by gaelds
Good morning,
I reused the code from the Thunderbird package to add a Firefox icon to the taskbar, and at the same time remove the IE icon. The IE icon disappears, but the Firefox icon doesn't appear in the taskbar, even though the .lnk file is correctly located in "C:\Users\username\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar". If I manually pin the Firefox shortcut, it works.

Code: Select all

def session_setup():
    firefox_quickLaunch = makepath(user_appdata(),'Microsoft','Internet Explorer','Quick Launch', 'User Pinned', 'TaskBar', 'Mozilla firefox.Lnk')
    ie_quickLaunch = makepath(user_appdata(),'Microsoft','Internet Explorer','Quick Launch', 'User Pinned', 'TaskBar', 'Internet Explorer.Lnk')

    if iswin64:
        destdir64 = makepath(programfiles,'Mozilla Firefox')
        if isfile(makepath(destdir64,'firefox.exe')):
            create_shortcut(firefox_quickLaunch,target=makepath(destdir64,'firefox.exe'), wDir=makepath(destdir64),icon=makepath(destdir64,'firefox.exe'))
    else:
        destdir32 = makepath(programfiles32,'Mozilla Firefox')
        if isfile(makepath(destdir32,'firefox.exe')):
            create_shortcut(firefox_quickLaunch,target=makepath(destdir32,'firefox.exe'), wDir=makepath(destdir32),icon=makepath(destdir32,'firefox.exe'))

    if isfile(ie_quickLaunch):
        remove_file(ie_quickLaunch)

Re: Pinned icons in the taskbar

Published: May 24, 2019 - 1:29 PM
by sfonteneau
In Thunderbird, replace if present:

To add ...:

https://social.technet.microsoft.com/Fo ... progeneral

Re: Pinned icons in the taskbar

Published: May 24, 2019 - 1:40 PM
by sfonteneau
Hey, after searching for a while I just discovered Syspin

http://www.technosys.net/products/utils/pintotaskbar

Code: Select all

syspin "C:\Program Files (x86)\wapt\waptself.exe" c:5386
Launch in setup session

We would need to dig a little deeper to understand how the little software program works.

Re: Pinned icons in the taskbar

Published: May 27, 2019 - 3:43 PM
by gaelds
Thanks for the link! It does indeed work well with Firefox or Calc, for example, but strangely I can't get it to work with Windows Explorer on the last line...

Code: Select all

run(ur'syspin.exe "%s" c:5386' %makepath(programfiles,'Mozilla Firefox',"firefox.exe"))
run(ur'syspin.exe "%windir%\System32\calc.exe" c:5386')

run(ur'syspin.exe "%windir%\explorer.exe" c:5386')

Re: Pinned icons in the taskbar

Published: January 23, 2020 - 5:28 PM
by nliaudat
reverse engineered version of syspin.exe available at https://github.com/airwolf2026/Win10Pin2TB

Re: Pinned icons in the taskbar

Published: March 12, 2020 - 3:56 PM
by nliaudat
The official method suggests modifying C:\Users\%username%\AppData\Roaming\Microsoft\Windows\Shell\LayoutModification.xml

For example

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<LayoutModificationTemplate
    xmlns="http://schemas.microsoft.com/Start/2014/LayoutModification"
    xmlns:defaultlayout="http://schemas.microsoft.com/Start/2014/FullDefaultLayout"
    xmlns:start="http://schemas.microsoft.com/Start/2014/StartLayout"
    xmlns:taskbar="http://schemas.microsoft.com/Start/2014/TaskbarLayout"
    Version="1">
  <CustomTaskbarLayoutCollection PinListPlacement="Replace">
    <defaultlayout:TaskbarLayout>
      <taskbar:TaskbarPinList>
        <taskbar:DesktopApp DesktopApplicationLinkPath="%APPDATA%\Microsoft\Windows\Start Menu\Programs\System Tools\File Explorer.lnk" />
      </taskbar:TaskbarPinList>
    </defaultlayout:TaskbarLayout>
  </CustomTaskbarLayoutCollection>
</LayoutModificationTemplate>
It replaces the taskbar and just adds the link to the file explorer.

More information on https://docs.microsoft.com/en-us/window ... 10-taskbar