Closed bNobo closed 4 years ago
In order to check if the application has already been launch, I see 3 options :
1) Store a value somewhere at the end of startup and check for its existence at the beginning of startup. It the value does not exists then it means first start and "run at start" should be checked automatically. The value could be stored in a file or in windows registry. 2) Use ApplicationDeployment.IsFirstRun Property to check whether application has already been launched or not. Check documentation here 3) Similar to solution 1) but use user's Properties.Settings instead of custom storage.
I think the more appropriate is solution 3)
I have created a new branch to implement this fix
I have made a very simple implementation which just check "run on startup" on first run without any other verification. The menu item will be checked no matter whether it is really a first installation or an update. So an existing installation where "run on startup" is not checked will have the menu item checked after update. I'm not sure it's really an issue because currently there are very little users who have installed the application. Moreover, I consider "run on startup" REALLY should be checked for a better user experience.
This application is intended to constantly run in the background, it won't if it is not at least launched :)