Close/Restart application automatically

Topics: Updater Application Block
May 27, 2005 at 12:29 PM
originally posted by: Puznee

Hi, I'm using the Updater Application Block for the first time. What I would like to do eventually is create a self-updating service: it should check periodically for updates, download them, apply them, and restart itself all without user intervention.

But first, I'm trying to get the AutoInProc QuickStart to do this, to make sure I know what I'm doing. Stopping the app is easy enough... I just put Application.Exit(); in the ActivationInitializationAborted event handler. And according to what I've read, I should be able to restart the app after the update in the ActivationCompleted event handler, after WaitForApplicationExitProcessor has run. However, my ActivationCompleted event handler is never fired. The application closes automatically, and when I manually restart it's been updated to version 2, but no ActivationCompleted event is fired.

Any idea what I'm doing wrong?

thanks,
Gabe