During the initial installation of Edge, most of the time an update was able to pass through the machine before the wapt package could be installed and it could block updates by policy.
This results in error 1722 which will eventually clear up when wapt can install an update not yet present on the machine.
To avoid this, you should not attempt the installation if a higher version is found on the machine.
With something like
Code: Select all
edge_higher_version_detected = False
for edge in installed_softwares(name="^Microsoft Edge$"):
if Version(edge["version"]) > Version(control.get_software_version()):
edge_higher_version_detected = True
if not edge_higher_version_detected:
install_msi_if_needed(
bin_name,
min_version=control.get_software_version(),
timeout=900,
remove_old_version=True,
)
if windows_version() > WindowsVersions.Windows10:
# Avoiding the usage by WAPT of the app built-in Uninstallstring for Windows 10+
uninstallkey.remove(app_uninstallkey)
Sincerely,
