Version is a 64-bit number that can be broken up into four components, and is specified for Internet Component Download as a,b,c,d, with most significant to least significant listed left to right.
The version of a file that can be downloaded through Internet Component Download is listed in either the CODEBASE attribute of the OBJECT element in the referring HTML page or in the corresponding OSD or INF files. If a recent enough version of a file is already available on the local computer, no download occurs. When deciding if the version of an available local file is acceptable, the following algorithm is applied:
HKEY_CLASSES_ROOT:\\CLSID\{... clsid ...}\Installed version\
If the default value of this key is of the format a,b,c,d it is assumed to be the available local version of the clsid. This support is for extending version support to non-PE files such as Java class files. To make the version check more robust, the code downloader will also look for an optional named value "path" under the Installed Version key, which, if present, is validated to be present on the file system on the local computer. This is to ensure that a download takes place when the registry information is intact, but the actual file that implements the classid has been removed from the hard disk.
In addition to the actual code address, the CODEBASE URL can also include an optional version number by using the following syntax:
"CODEBASE=http://www.foo.com/bar.ocx#Version=a,b,c,d"
The Internet Component Download mechanism downloads and installs the file only if the specified version number is more recent than any existing version of the same file currently installed in the system. If a version number is not specified with a file, it is assumed that any version installed on the system is recent enough.
If the version number specified in the CODEBASE attribute is "-1,-1,-1,-1", Internet Component Download will always try to download the latest version of the desired component. Note that this can be a costly effort involving many network transactions, especially if the Internet search path is searched for the newest version of an object. Note also that because of the Internet search path, it is possible for the Component Download service to try to download code in the absence of a CODEBASE attribute. In fact, if the CODEBASE attribute is the URL fragment "#Version=-1,-1,-1,-1", there is no specific location to download code from, but the Internet search path will still be searched to find the latest version of an object.