Ho riutilizzato il codice del pacchetto Thunderbird per aggiungere un'icona di Firefox alla barra delle applicazioni e rimuovere contemporaneamente l'icona di IE. L'icona di IE scompare, ma l'icona di Firefox non appare nella barra delle applicazioni, anche se il file .lnk si trova correttamente in "C:\Users\username\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar". Se aggiorno manualmente il collegamento a Firefox, funziona.
Codice: Seleziona tutto
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)