|
Installed Version Detection
Version detection method...
There are different methods to detect which version of a software product is installed on the end-user's computer. For example, you can store the version number in the system registry or get it from the resources of one of the executable files. It is impossible to list all the variety of available methods, therefore we have implemented just one, which in our opinion is the most universal method, and will satisfy the overwhelming majority of PatchFactory's users. We have named this method as the "version key method". But if its applying for any reason is impossible, there is always an opportunity to use a custom detection method.
The idea of version keys method is based on the assumption that it is possible to observe changes both in structure of files, and in their content from version to version of a software product. The number of such files which are constantly being changed from version to version is usually insignificant.
To perform the unequivocal identification of the version we'll use the key defined by the set of version-key files names and the MD5-values of their content. MD5 is used to replace a content of a file, thus, to provide a small size of a version key with a high probability of its uniqueness.
Such files which participate in the version key composition we shall name version key files or just version keys.
A set of files which form the version key, must be defined by user.
There are two main requirements, made to version key files:
- none of those files can be changed / deleted on the end-user's side;
- version key files must be certainly present on the end-user's computer to detect th installed version correctly, therefore version keys must be specified only inside the required components, or they will be ignored;
And besides try to minimize the number of version key files.
- As the most simple and at the same time reliable method to provide the presence of the unique file in each version, we can suggest placing a file named "vernum", for example, which contains the number of the current version installed inside one of the required components. So if you define the file "vernum" as a version key file you may be sure that problems with installed version detection will not arise anymore.
Hereinafter we suppose that only one version of the software product to be updated is installed. In some case it is also possible to detect the installed version using the version key method if several versions are installed on the same computer, though the correctness in this case is dependent on how the version keys are defined and what folder are they stored in.
|