I usually work on a Linux system, but I have a situation where I need to write a client app which would run on windows as a serivce. Can someone help me or direct to, on how to build a MenuBar app ( for example like dropbox) for windows environment, which gets started on OS startup and the icon sits in the TaskBar and on clicking the app icon presents a menu.
My scripting language is python. Thanks.
You do this using the pywin32 (Python for Windows Extensions) module.
Example Code
Similar Question
To make it run at startup you could mess around with services but it's actually much easier to install a link to the exe in the users "Startup Folder".
Windows 7 and Vista
c:\Users\[username]\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
Windows XP
c:\Documents and Settings\[username]\Start Menu\Programs\Startup
I modified the
SysTrayIcon.py
script to work in Python 3pip install pywin32
.python Scripts/pywin32_postinstall.p -install
from your Python directory to register the dlls.pythonw.exe
.Plyer
package).menu_options = ((None, None, None),)
- (or change the class to not always append menu_options).There are (at least) a couple of libraries openly available for this now:
I just started using
infi.systray
in a project, and it's worked well for me. Here's how little code you need to do something very basic (taken from their docs):