[SOLVED] Multiple Office packages + plugin

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
MIKL
Messages: 5
Registration: Oct 26, 2022 - 08:57

February 9, 2023 - 10:02 AM

Hello,

I'm creating this new topic because I haven't found answers to my questions online or in other forum discussions.
We want to deploy all our software via WAPT, including Office.
However, in our environment, we have several versions (Standard/Pro/with and without Visio/etc.).
We then need to install a tool called "HTMO" (HCL Traveler for Microsoft Outlook). This product won't install if Office isn't already installed on the client machine. So, I'm creating a package dependency for an Office installation.
The problem is that, since we have multiple Office installations, there's no "OR" type dependency (e.g., to install HTMO, either the Office Standard package OR Office Pro must be installed).
The only solution I currently see is to create the "HTMO" package multiple times, one for each Office installation we have (so each HTMO package depends on an Office version).
If I add all Office versions as dependencies to the HTMO package, the HTMO package will install and uninstall all dependent Office versions, right down to the last one.

Do you have any idea how to make it so there's only one "HTMO" package and the only requirement for it to install is: An Office version must be installed on the machine, any version will do?

Thank you in advance for your help.
User avatar
dcardon
WAPT Expert
Messages: 1929
Registration: June 18, 2014 - 09:58
Location: Saint Sébastien sur Loire
Contact :

February 9, 2023 - 10:59

Hello Mickaël,

In your HTMO package, you can check at the beginning of the `def install()` function if one of the Office packages is installed (or if you have `office` in `installed_software`), and throw an error if MS Office is not present. Something like this:

Code: Select all

def install():
    # check if one of the office package is installed
    is_office_installed = False
    for entry in WAPT.list():
        if 'lhro-microsoftoffice1' in entry.package  or 'lohr-msoffice-2' in entry.package or 'lohr-office-3' in entry.package:
            is_office_installed = True

    if is_office_installed == False:
        error('missing Office Install')

    # install extension
    run('setup_my_wonderfull_extension.exe /S')
Sincerely,

Denis
Denis Cardon - Tranquil IT
Share your experiences on WAPT! Send us your blog and article URLs in the "Your Opinion of the forum, and we'll feature them on the WAPT
MIKL
Messages: 5
Registration: Oct 26, 2022 - 08:57

February 10, 2023 - 11:57

Hello,

thank you for your feedback; thanks to your answer, I was able to find the correct installation syntax! :D
User avatar
dcardon
WAPT Expert
Messages: 1929
Registration: June 18, 2014 - 09:58
Location: Saint Sébastien sur Loire
Contact :

February 10, 2023 - 12:32

Thanks for your feedback, Michael. I'm glad you were able to find a method that suited your use case, :-)

Denis.
Denis Cardon - Tranquil IT
Share your experiences on WAPT! Send us your blog and article URLs in the "Your Opinion of the forum, and we'll feature them on the WAPT
Locked