Page 1 of 1

[SOLVED] Multiple Office packages + plugin

Published: February 9, 2023 - 10:02 AM
by MIKL
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.

Re: Multiple Office packages + plugin

Published: February 9, 2023 - 10:59 AM
by dcardon
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

Re: Multiple Office packages + plugin

Published: February 10, 2023 - 11:57 AM
by MIKL
Hello,

thank you for your feedback; thanks to your answer, I was able to find the correct installation syntax! :D

Re: [SOLVED] Multiple Office packages + plugin

Published: February 10, 2023 - 12:32 PM
by dcardon
Thanks for your feedback, Michael. I'm glad you were able to find a method that suited your use case, :-)

Denis.