import ctypes myappid = u'mycompany.myproduct.subproduct.version' # arbitrary string ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID(myappid)
References
https://stackoverflow.com/questions/1551605/how-to-set-applications-taskbar-icon-in-windows-7