[Resolved] OpenBoard dependency reinstalls itself every time

Questions about WAPT Packaging / Requests and help regarding Wapt packages.
Forum Rules
Community Forum Rules
* English support on www.reddit.com/r/wapt
* French community support is available on this forum
* Please prefix the topic title with [RESOLVED] if it is resolved.
* Please do not edit a topic that is tagged [RESOLVED]. Open a new topic referencing the old one.
* Specify the installed WAPT version, full version, and build number (2.2.1.11957 / 2.2.2.12337 / etc.) as well as the Enterprise/Discovery edition.
* Versions 1.8.2 and earlier are no longer supported. The only questions accepted regarding version 1.8.2 are related to upgrading to a supported version (2.1, 2.2, etc.).
* Specify the server OS (Linux/Windows) and version (Debian Buster/Bullseye - CentOS 7 - Windows Server 2012/2016/2019).
* Specify the OS of the administration/package creation machine and the machine with the problematic agent, if applicable (Windows 7/10/11/Debian 11/etc.).
* Avoid asking multiple questions when opening a topic, otherwise it may be ignored. If there are multiple topics, open separate topics, preferably one after the other and not all at the same time (i.e., do not spam the forum).
* Include code snippets, screenshots, and other images directly in the post. Links to Pastebin, Bitly, and other third-party sites will be systematically removed.
* As with any community forum, support is provided voluntarily by members. If you require commercial support, you can contact Tranquil IT's sales department at 02.40.97.57.55
Locked
User avatar
Jonattend
Messages: 43
Registration: March 26, 2018 - 2:45 PM

November 15, 2019 - 10:15

Good morning,
I use a "master" package with, as dependencies, about 20 packages including openboard.

If I modify my master package, the client machines update it, which is normal. But I've noticed that the openboard package is reinstalled every time, even if it's already present on the machines (unlike the others).

I also had this problem with the Anki package which I solved by specifying the uninstallation key (key='Anki') in the Anki package.

Regarding OpenBoard, I think the installation is faulty, which causes this phenomenon.

If I make a wapt-get list-registry On one client, I have this for OpenBoard:

{8CCA6AC7-BBF9-4DD2-8E70-A907E0FCA38F}}_is1OpenBoard "C:\Program Files (x86)\OpenBoard\unins000.exe"

We note that the command does not return any version number and that the UninstallKey key seems strange to me.

Using the following code:

Code: Select all

# -*- coding: utf-8 -*-
from setuphelpers import *

uninstallkey = ['{8CCA6AC7-BBF9-4DD2-8E70-A907E0FCA38F}}_is1']

def install():
    print('installing prefix-openboard')
    install_exe_if_needed("OpenBoard_Installer_1.5.3.exe",'/VERYSILENT /SUPPRESSMSGBOXES /NORESTART',key='{8CCA6AC7-BBF9-4DD2-8E70-A907E0FCA38F}}_is1')
WAPT returns the following error during installation on a client:

Code: Select all

EWaptSetupException: Fatal error : OpenBoard_Installer_1.5.3.exe has been executed and UninstallKey {8CCA6AC7-BBF9-4DD2-8E70-A907E0FCA38F}}_is1 has been found in the registry, but version in registry does not match requirements of min_version=0.0.0.0
What can I do? I think the problem is that OpenBoard doesn't have a version number...?

Thank you for your suggestions.
Last edited by Jonattend on Nov 15, 2019 - 4:15 PM, edited 1 time.
WAPT Server version: 1.8.1 on Debian 10
WAPT Agent version: 1.8.1.6756
WAPT Setup version: 1.8.1.6756 on Windows10 v1909
WAPT Deploy version: 1.8.1.6756
User avatar
htouvet
WAPT Expert
Messages: 436
Registration: March 16, 2015 - 10:48
Contact :

November 15, 2019 - 1:08 PM

Indeed, the installer does not put a version number in the registry.
Therefore, it needs to be retrieved from elsewhere... in the executable file, for example, hence the `get_installed_version` function
And specify the minimum version in install_exe_if_needed

Code: Select all

def get_installed_version(e):
    ob_path = makepath(programfiles32,'OpenBoard','OpenBoard.exe')
    if isfile(ob_path):
        return get_file_properties(ob_path)['FileVersion']
    else:
        return None

def install():
    print('installing tis-openboard')
    install_exe_if_needed("OpenBoard_Installer_1.5.3.exe",'/VERYSILENT /SUPPRESSMSGBOXES /NORESTART',key='{8CCA6AC7-BBF9-4DD2-8E70-A907E0FCA38F}}_is1',min_version='1.5.3.240',get_version=get_installed_version)
Tranquil IT
User avatar
Jonattend
Messages: 43
Registration: March 26, 2018 - 2:45 PM

November 15, 2019 - 2:38 PM

Hello,

thank you for the reply, it works!

To be sure I understand correctly and don't just copy and paste, can you confirm that the `get_version` function retrieves the version of the .exe file and returns the result?

Otherwise, even after modifying the package, ` wapt-get list-registry` still returns nothing regarding the version number. Is this normal?
WAPT Server version: 1.8.1 on Debian 10
WAPT Agent version: 1.8.1.6756
WAPT Setup version: 1.8.1.6756 on Windows10 v1909
WAPT Deploy version: 1.8.1.6756
User avatar
htouvet
WAPT Expert
Messages: 436
Registration: March 16, 2015 - 10:48
Contact :

November 15, 2019 - 2:48 PM

Yes, you can provide the `install_exe_if_needed` function with a `get_version` parameter. This parameter should point to a function that takes a parameter (a dictionary containing the information currently in the registry) and returns the version.

By default, if this parameter isn't provided, the function uses the `version` key from the registry.

In the case of OpenBoard, this doesn't work because the installer doesn't store anything in this `version` key. So, we provide an alternative function, and in this case, I suggested retrieving the version from the OpenBoard executable's metadata.

It's normal that `list-registry` doesn't display anything additional, because we haven't modified the registry.
Tranquil IT
User avatar
Jonattend
Messages: 43
Registration: March 26, 2018 - 2:45 PM

November 15, 2019 - 4:14 PM

I understand everything, it's perfect, ;)

thank you!!
WAPT Server version: 1.8.1 on Debian 10
WAPT Agent version: 1.8.1.6756
WAPT Setup version: 1.8.1.6756 on Windows10 v1909
WAPT Deploy version: 1.8.1.6756
Locked