Page 1 of 1

GLPI Agent 1.5 Package

Published: October 20, 2023 - 4:32 PM
by Computer Science
Good morning,

Novice in creating WAPT packages (and in the WAPT forum) :) ), I am trying to create a package for the installation of the GLPI Inventory 1.5 agent.
Everything is fine, but during the audit, it doesn't work and I get the following error:
AttributeError: 'PackageEntry' object has no attribute 'setuppy'

I can just perform a "print" in the audit, the error still appears.

Here is the package setup:

Code: Select all

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


def install():
    # Variables
    app_name="GLPI-Agent-1.5-x64.msi"
    properties= {
        'runnow':1,
        'add_firewall_exception':1,
        'execmode':1,
        'Server':"https://glpi.fontenay-aux-roses.fr/plugins/glpiinventory/",
        'tag':"HDV",
    }
    uninstallkey="{AACB13FD-6BF5-1014-8857-9DC1274EEC25}"

    # Uninstalling Fusion Inventory
    if installed_softwares("FusionInventory Agent 2.5.2 (x64 edition)"):
        print("Désinstallation de Fusion Inventory")
        run(r'"C:\Program Files\FusionInventory-Agent\Uninstall.exe" /S')
        remove_tree("C:\Program Files\FusionInventory-Agent")
    else:
        print("Fusion Inventory n'est pas installé sur le poste.")

    install_msi_if_needed(
        app_name,
        properties=properties,
        key=uninstallkey,
        remove_old_version="true",
    )

def audit():
    if isfile("C:\Program Files\GLPI-Agent\glpi-inventory.bat"):
        return "OK"
    else:
        return "ERROR"
Thank you in advance for your help!

Melanie

Re: GLPI Agent 1.5 Package

Published: October 20, 2023 - 6:05 PM
by sfonteneau
Hello,

I managed to reproduce your problem.

It occurs when an audit is launched but the installation failed previously.

Did the installation work?

Re: GLPI Agent 1.5 Package

Published: October 23, 2023 - 10:16 AM
by Computer Science
Hello,

So, believe it or not, after running my tests again just now, I'm getting an "OK" result on the audit now...

And goodness knows I spent quite a bit of time on that package! :lol:

Unfortunately, I couldn't say where it came from, but a big thank you for your reply anyway!