Hi,
I have an app that starts-up with Windows and (unless explicitly closed by the user) runs until shutdown in the tray. I want to be able to check for and prepare updates while the app is running, but only apply them when the user restarts his computer (I will have mostly cold updates).
I am well aware of the scenario where I run ApplyUpdates when the user exits the app, but that doesn't really work in my case, because that will be most often when he shuts down Windows, and that doesn't allow apps to open new tasks (the auto-updater in this case), so I think the best solution for me is to do it on app start (check for already prepared updates and call ApplyUpdates before doing anything else).
Now my question is: How do I go about doing that? Persisting the state of the UpdateManager on disk sounds like exactly what I want -- to have it in the UpdatesPrepared state at startup with everything ready, but that's veery hacky and I'm not even sure it'll work. Or am I going about this entirely wrong?
Thanks!