Here we use Windows Interface ,Python Call in windows Interface , have access to win32com
The code is as follows :
def DeleteQuickLaunchOnTaskBar(lnkName): objShell = win32com.client.Dispatch("Shell.Application") taskbarPath = os.path.join(os.environ["appdata"], r'Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar') lnkName = DesktopCommon.ToUnicode(lnkName) objFolder = objShell.NameSpace(taskbarPath) desktopItems = objFolder.Items() for item in desktopItems: if DesktopCommon.ToUnicode(item.Name) == lnkName: verbs = item.Verbs() for verb in verbs: if DesktopCommon.ToUnicode(verb.Name) == u" Detach from the taskbar (&K)" or DesktopCommon.ToUnicode(verb.Name) == u"Unpin from Tas&kbar": verb.DoIt() </pre>