0

Lookup Installed Version in the Clients Registry

If an installer is abandoned or an app is modified by an external source
the version in the updater prefs may be out of sync with the installed
version. To prevent these values from getting out of sync lookup the
product version in the `Clients` registry, and, if its a valid version,
override the version in the updater prefs.

This fix is not necessary on macOS because `LookupVersion` is already
implemented on macOS to lookup the version in the app's registered
plist.

Bug: 370543468
Change-Id: Ia39daf0f427adb763e2b1debcffcf358a639ab3c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5909796
Commit-Queue: Joshua Pawlicki <waffles@chromium.org>
Reviewed-by: Sorin Jianu <sorin@chromium.org>
Reviewed-by: Joshua Pawlicki <waffles@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1365696}
This commit is contained in:
Allan Kerr
2024-10-08 18:13:51 +00:00
committed by Chromium LUCI CQ
parent 78e2f029d3
commit 901b3fd477
7 changed files with 97 additions and 10 deletions

@ -1323,6 +1323,14 @@ POSIX platforms, they will additionally lchown the existence checker path
registered by the application to be owned by the root user. User-scope updaters
use this as a signal that the application is managed by a system-scope updater.
#### Windows
Application installers are expected to register with the updater by setting
[HKCU or HKLM]\SOFTWARE\{Company}\Update\Clients\{AppID} → pv to the installed
version of the application. If pv is present and valid in the app's Clients
key it will be used by the updater as the source of truth for the registered
version.
For backwards compatibility with third party software, on Windows, after a
successful registration and on each update, the updater will set
[HKCU or HKLM]\SOFTWARE\{Company}\Update\ClientState\{AppID} → pv to the