The update program provided by Microsoft is not easy to use, so I wrote this program again. The upgrade file and the configuration file updatelist. XML are used to update and upgrade the local program file through the version numbers of the local program and the server program file.
The updatelist. xml file contains the following content:
<? XML version = "1.0" encoding = "gb2312"?>
<Autoupdater>
<Description> application AutoUpdate </description>
<Updater>
<URL> http: // 10.0.5.98/softupdate/</URL>
<Lastupdatetime> 2005-09-05 </lastupdatetime>
</Updater>
<Application applicationid = "itemsoft">
<Entrypoint> itemsoft.exe </entrypoint>
<Location>. </location>
<Version> 1.0.0.0 </version>
</Application>
<Files>
<File ver = "1.0.0.0" name = "itemsoft.exe"/>
<File ver = "1.0.0.0" name = "reports \ test.txt"/>
<File ver = "1.0.0.0" name = "InterOP. grprolib. dll"/>
<File ver = "1.0.0.0" name = "reports \ test. GRF"/>
</Files>
</Autoupdater>
Note:
<Description> </description> description of the program;
<URL> </URL> Update the server address to a virtual directory or site path;
<Entrypoint> </entrypoint> Update the main program file, which is exe;
<Location>. </location> Update the path of the main program file;
<Version> 1.0.0.0 </version> main program version;
<Files> </Files> list of files to be updated; Ver: file version number, name: file name, including path (relative );
In use, create a web virtual directory or site on the Update Server, and then put the file to be updated and updatelist. xml on it;
Put autoupdate.exe and updatelist. XML in the root directory of the main program. If the version number of the local updatelist. xml file is smaller than that of the server, the automatic program automatically downloads the file to be updated.
The update program is used in the project included in my complete. Net Package download.
Download source code:/files/Jenry/autoupdate.rar
Download binary files:/files/Jenry/bin.rar
Generate the configuration file updatelist. xml tool:/files/Jenry/aulwriter1.0.rar (provided by whatisgood, thank you !!) New