ActiveX automatic upgrade function running in the browser

zhaozj2021-02-16  181

ActiveX automatic upgrade function running in the browser

(http://blog.9cbs.net/wqf2)

Nowadays, some of our company's application products have the needs of B / S, and ActiveX has been the most convenient bridge for our C / S transition to B / S. The biggest benefit of B / S is to be deployed without the need to run the installer. In our traditional C / S client, the model used by the automatic upgrade feature is: the server runs an automatic upgrade service program, the client connection This service is determined by the version, download the upgrade. Now that the B / S structure is upgraded, an ActiveX control also uses this mode, it is a bit small matter. I want to talk about my ActiveX automatic upgrade function. First, the ActiveX controls and dependencies are packet into the CAB package. The tool I use is the production of CAB tools in Visual Studio .NET 2003. The XML file of the file OSD will be made in the generated CAB package. This file describes the names, packages of the package, and component information. The version of the package is the comparative condition for us later. Before generating a package, we can use Visual Studio.net 2003 to set this version. Then, write the HTML file calling ActiveX, call as follows: ClassID is the CLSID of the component. Codebase is the download address of the ActiveX component and the version of the CAB package. When browsing this page, you will first judge whether this ActiveX, if you don't go to http://www.yournet.com/test.cab download; if you have a judge, when you install the CAB installed If the version of the file is lower, you will download updates from http://www.yournet.com/test.cab. So you can implement an automatic upgrade function without writing or overwriting any program. When there is a new version of ActiveX, you can add a CAB package, add this Cab version, then change it to the corresponding version in CodeBase's Version. Exterior: The CAB file downloaded from the website will be saved in the "Downloaded Program Files" folder under the Windows directory. If your CAB package is updated, the old OCX file is not covered, but a total There is a CAB package, that is, your machine will have the various versions of the ActiveX, compatibility is valid.

转载请注明原文地址:https://www.9cbs.com/read-8603.html

New Post(0)
CopyRight © 2020 All Rights Reserved
Processed: 0.034, SQL: 9