Startup registry entry and Preferences setting issue
1) Spark is installed and there is no entry in startup registry, checkbox in Preferences is unchecked also (startOnStartup=false in spark.properties).
2) Installing new Spark version on top of old installation. Installer is putting startup registry in system startup. startOnStartup is still showing false.
3) Launching Spark. startOnStartup is still false, until you hit the Login tab in Preferences. At that point Spark reads the registry, puts checkbox in and changes startOnStartup to true.
4) Exit Spark. Delete startup registry. startOnStartup is of course true.
5) Launch Spark again. startOnStartup is true, but it doesnt create startup registry until you go to Login tab in Preferences. But if you go to a Login tab. It then reads the startOnStartup setting and puts registry entry in system startup. Why dont it read registry setting again and set startOnStartup setting to false?
Looking at the latest revision in SVN, # 11,417, it seems as if you have gone ahead and fixed the Launch On Startup. Nice job.
As I am trying to figure this out, i cannot figure out where is "appdir" defined. I see it is referenced in line 111 of org.jivesoftware.Spark.startup() And insight would be greatly appreciated.
Just to complete the operations, this code deletes an entry in the Windows Registry.
Assigning this to cstux, though Markus said he will try to create custom MSI installer and also fix this issue that Preferences value is not written to the registry. He will propose a patch later.
I cannot figure out how to attach files to this JIRA setup, so here is the code to read and write the Windows Registry:
Disclaimer: This has only been tested on a Windows XP SP3 machine. Also, if a Security Manager is being used, there might be issues; in this situation, one of the alternatives I provide below could be investigated.