I have created a windows service to kick开发者_如何学Python off a daily process and I also have created a system tray app (in other words, a win form app that displays system tray icon with a context menu) to control this windows service. The context menu also shows the result of the last run and the runtime for the next time (there is a random element to the start time a la anacrontab)
The issue I'm struggling with is, how do I make sure that the system tray app runs when:
The service is installed & a user logs in (remotely)
I know about the Startup folder, but it seems a little bit noddy. Is there any other way?
Do you want that system tray application to run when none is logged in???
i think you should try with startup thing and if you found any problem then go for work around.
i am also working on similar thing but i have different problem.
I'm in the same situation, and yes, Startup folder is still unreliable in 2021.
From my experience, Windows Task Scheduler is the most reliable way. You can configure it to run anything on Logon, or on one of many other supported events:
精彩评论