GLPI Agent 1.5 Package

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
Answer
Computer science
Messages: 2
Registration: Oct 20, 2023 - 4:25 p.m.

October 20, 2023 - 4:32 PM

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
User avatar
sfonteneau
WAPT Expert
Messages: 2318
Registered: July 10, 2014 - 11:52 PM
Contact :

October 20, 2023 - 6:05 PM

Hello,

I managed to reproduce your problem.

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

Did the installation work?
Computer science
Messages: 2
Registration: Oct 20, 2023 - 4:25 p.m.

October 23, 2023 - 10:16

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!
Answer