Dynamic GUID

Hi Wyatt,

Is it possible to specify the GUID of the AutomaticUpdater control at run time (possibly after reading the value from a settings file).I have created a generic 'Updater' software which reads settings such as the Application EXE Name from an xml file.What this 'Updater' software does is to launch the specified Application EXE when it starts, unless updates have already been downloaded and are ready to install. If these updates are already downloaded and ready to install, then the software installs them, and then launches the specified EXE after that otherwise it checks for updates and if it finds them, it downloads them and then exits so that they are installed at the next launch.Thus, this software is an invisible updater for any other software. The main difference between my app and wyUpdate.exe is that my app is invisible, non-intrusive, does not disturb the user under any condition. It also informs a server (via a webservice) that the particular client's machine is up to date, or if there was an error while updating. There is some other added functionality that prevents me from using wyUpdate.exe directly, so that is not an option. And it is also not an option for me to add the AutomaticUpdater control to the Applications it needs to update directly.

I have gotten my application to work perfectly - just the way I want it, however, I still have to build different versions of my application, with different GUID's for the AutomaticUpdater control in order for it to update different Applications on the same computer. Although it isn't that major a problem, it would still be a lot easier if my app could specify the GUID at run time by reading it from a settings file perhaps.

I hope I was able to explain the problem sufficiently...

Thanks in advance!Regards.

Hey Omaer,

Is it possible to specify the GUID of the AutomaticUpdater control at run time (possibly after reading the value from a settings file).

Not as the AutomaticUpdater is written now, no. The GUID is used in "InitializeComponent();" part of your form. This is also where the AutomaticUpdater instance is initialized.

You could work around this issue by dynamically creating and adding the AutomaticUpdater to the form immediately after InitializeComponent(); is called. Then you could set the GUID to anything you want. If you choose to go this way you'll also have to call this function after you've set all of the properties and added the control to the form:

((System.ComponentModel.ISupportInitialize)(this.automaticUpdater)).EndInit(); 

However you won't be able to change the GUID after the EndInit() function is called. That's just the way the AutomaticUpdater was designed.

We'll releasing a separate AutomaticUpdaterBackend class soon. This class will allow you do use the backend for special uses and have multiple AutomaticUpdaterBackend instances.

Method 2

Since it sounds like you're largely checking for updates for multiple sub-apps, you might be better off calling wyUpdate.exe directly in silent mode. See: How to Silently Check for Updates.

If you called:

wyupdate.exe -quickcheck -justcheck -noerr

You could check whether each one of your sub-apps is up-to-date and communicate this to each app.

Method 3

We will soon be releasing the AutomaticUpdater source code. When we do you'll be able to use the AutomaticUpdater backend for lots of interesting uses.