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)