Software Update Webservice?

  • Thread starter Thread starter joo
  • Start date Start date
J

joo

Hi!
I need to implement something similar to "Automatic Update" feature which we
see in windows 2000. We need this support for our software, basically to
provide the software update. How can I exploit .Net technology to implement
this?
Any idea on this?
Thanks.
 
There are a quite a few ways to do this, for software
application designs, I prefer calling the web service
from within a subcomponent of the application.

There are quite a few parts involved to do this.

Basically you are going to need two services, and your
application is going to need to interface with one of
them (to query whether or not there are updates
available).

One service will run under the NETWORKSERVICE account (if
available) to check to see if there are updates from the
website. (Service A)

The second service runs under the LOCALSYSTEM account to
actually fire up the msiexec process to install the
updates. (Service B)

(Service A) is the check and transfer mechanism whereas
(Service B) job is to actually fire up the installation.
(Service B) has no network access - but full local system
privledges.

Due to my NDA - I can't tell you codewise how to do it -
since I've already implemented it - but I can give you
the general steps...

When your application starts up - Ask (Service A) to see
if any updates are available.

(Service A) will tell (Service B) to check for updates.
(Service B) will make a call to the web service.

If there are no updates, service b returns status flag
that says so to Service A then service A returns to the
application that there are no updates available.

If updates are available, return a structure that
contains information (perhaps in XML format) for (Service
B) to retrieve those updates (basically instructions on
how to get the files - and info on what those files
should be - the command line parameters to pass to those
files, when they are run).

When (Service B) fetches the files to the local machine,
(Service A) will then get the XML data from (Service B)
that was returned from the web service so it knows
exactly what to call to install the updates.

Here is an example XML structure:

<Updates>
<Version 1.0>
<Files>
<File>
<Name>"update.exe"</Name>
<Version>"1.0.5.0"</Version>
<Description>Update the .dll file to show
UI</Description>
<Size>423838</Size>
<CRC>"0x48c"</CRC>
<CLP>"/q /c:'setup.exe /R:N /Q:a'"</CLP>
</File>
<File>
<Name>"setup.exe"</Name>
<Version>"2.0.0.0"</Version>
<Size>423838</Size>
<CRC>"0x48c"</CRC>
<CLP>"/q /c:'setup.exe /R:N /Q:a'"</CLP>
</File>
</Files>
</Version 1.0>
<Version 2.0>
.....
.....
</Version 2.0>
</Updates>

If you standardize on a XML format for your file updates,
then you can support multiple versions of the same
application - and apply the updates that pertain to that
specific version.

(Service A) will look at the XML file, do some basic
checking to see if the updates have already been applied
by looking at the version of your software and files that
have already been applied to determine which update to
put in the system - you could maintain a registry key
that basically has a string value for each update
applied - then you can track it easily - no different
than what MS does for IE I suppose. :)

Good luck! :)

I hope this gave you some guidance.

=-Chris

Christopher F. Conner
Senior Database Administrator
GIS Information Systems
http://www.gisinfosystems.com/
(e-mail address removed)

To send email inquiries, remove NOSPAM from my email
address.
 
Back
Top