Page 1 of 1

[SOLVED] Wapt packet execution error 1619

Published: October 11, 2023 - 1:11 PM
by Benoit
Good morning,

Wapt Enterprise version: 2.4.0.14143
Wapt server: Debian
machine used to create packages: Windows 10

I am currently creating a package for the zedfree software.
My script works perfectly from pyscripter however when I deploy the package from wapt, I get an error "Setup ZEDFREE 2022.4 x64.exe" /S /v/qn\' returned non-zero exit status 1619.

Could you help me understand why I'm only getting this error message on wapt?.

Here is my script:

Code: Select all

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

name_software= "ZEDFREE"
exe = 'Setup ZEDFREE 2022.4 x64.exe'
silentflags='/S /v/qn'
key=''
min_version='22.4'
command = 'MsiExec.exe /X{00000022-9040-3CA8-8868-36F59DEFD14D} /qn'

def uninstall():
    # Exécute la commande de désinstallation
    subprocess.run(command, shell=True)
    print(name_software+" a été désinstallé")


def install_exe():

    # installation de l'application
    print("L'installation de "+name_software+" commence")
    install_exe_if_needed(exe,
        silentflags=silentflags,
        key=key,
        min_version=min_version
    )
    print("L'installation de "+name_software+" est terminée")

def install():

    software_installed = False
    for software in installed_softwares(): # boucle for qui vérifie si le logiciel est déjà installé

        if software['name'] == name_software:
            software_installed = True
            if software_installed == True :
                uninstall()
                install_exe()

            break

    if software_installed == False :
        install_exe()


Here is the error message:

Code: Select all

Installing enit-zedfree-csn(=22.4-2)
L'installation de ZEDFREE commence
Installing: Setup ZEDFREE 2022.4 x64.exe (22.4)
Erreur lors de l'installation de ['enit-zedfree-csn']: erreurs dans les paquets [[PackageRequest(package='enit-zedfree-csn',architectures=['x64'],locales=['fr'],maturities=['PROD'],tags=['windows-10', 'win-10', 'w-10', 'windows10', 'win10', 'w10', 'windows', 'win', 'w'],min_os_version=Version('10.0.19045'),max_os_version=Version('10.0.19045')), PackageEntry('enit-zedfree-csn','22.4-2' maturity='PROD',target_os='windows'), 'Traceback (most recent call last):\n  File "C:\\Program Files (x86)\\wapt\\common.py", line 5192, in install\n    result = self.install_wapt(p.localpath,\n  File "C:\\Program Files (x86)\\wapt\\common.py", line 4176, in install_wapt\n    raise e\n  File "C:\\Program Files (x86)\\wapt\\common.py", line 4083, in install_wapt\n    exitstatus = setup.install()\n  File "C:\\Windows\\TEMP\\wapt3jnfq_t8\\setup.py", line 40, in install\n  File "C:\\Windows\\TEMP\\wapt3jnfq_t8\\setup.py", line 20, in install_exe\n  File "C:\\Program Files (x86)\\wapt\\common.py", line 4033, in new_func\n    return func(*args, **kwargs)\n  File "C:\\Program Files (x86)\\wapt\\setuphelpers_windows.py", line 1495, in install_exe_if_needed\n    run(r\'"%s" %s\' % (exe, silentflags), accept_returncodes=accept_returncodes, timeout=timeout, pidlist=pidlist)\n  File "C:\\Program Files (x86)\\wapt\\waptutils.py", line 2118, in run\n    raise CalledProcessErrorOutput(proc.returncode, cmd, \'\'.join(output))\nwaptutils.CalledProcessErrorOutput: Command \'"Setup ZEDFREE 2022.4 x64.exe" /S /v/qn\' returned non-zero exit status 1619.\nOutput:\n']]
Traceback (most recent call last):
  File "C:\Program Files (x86)\wapt\waptservice\service.py", line 1910, in run
    self.running_task.run()
  File "C:\Program Files (x86)\wapt\waptservice\waptservice_common.py", line 716, in run
    self._run()
  File "C:\Program Files (x86)\wapt\waptservice\waptservice_common.py", line 1288, in _run
    raise Exception(_('Error during install of {}: errors in packages {}').format(
Exception: Erreur lors de l'installation de ['enit-zedfree-csn']: erreurs dans les paquets [[PackageRequest(package='enit-zedfree-csn',architectures=['x64'],locales=['fr'],maturities=['PROD'],tags=['windows-10', 'win-10', 'w-10', 'windows10', 'win10', 'w10', 'windows', 'win', 'w'],min_os_version=Version('10.0.19045'),max_os_version=Version('10.0.19045')), PackageEntry('enit-zedfree-csn','22.4-2' maturity='PROD',target_os='windows'), 'Traceback (most recent call last):\n  File "C:\\Program Files (x86)\\wapt\\common.py", line 5192, in install\n    result = self.install_wapt(p.localpath,\n  File "C:\\Program Files (x86)\\wapt\\common.py", line 4176, in install_wapt\n    raise e\n  File "C:\\Program Files (x86)\\wapt\\common.py", line 4083, in install_wapt\n    exitstatus = setup.install()\n  File "C:\\Windows\\TEMP\\wapt3jnfq_t8\\setup.py", line 40, in install\n  File "C:\\Windows\\TEMP\\wapt3jnfq_t8\\setup.py", line 20, in install_exe\n  File "C:\\Program Files (x86)\\wapt\\common.py", line 4033, in new_func\n    return func(*args, **kwargs)\n  File "C:\\Program Files (x86)\\wapt\\setuphelpers_windows.py", line 1495, in install_exe_if_needed\n    run(r\'"%s" %s\' % (exe, silentflags), accept_returncodes=accept_returncodes, timeout=timeout, pidlist=pidlist)\n  File "C:\\Program Files (x86)\\wapt\\waptutils.py", line 2118, in run\n    raise CalledProcessErrorOutput(proc.returncode, cmd, \'\'.join(output))\nwaptutils.CalledProcessErrorOutput: Command \'"Setup ZEDFREE 2022.4 x64.exe" /S /v/qn\' returned non-zero exit status 1619.\nOutput:\n']]

Exception: Erreur lors de l'installation de ['enit-zedfree-csn']: erreurs dans les paquets [[PackageRequest(package='enit-zedfree-csn',architectures=['x64'],locales=['fr'],maturities=['PROD'],tags=['windows-10', 'win-10', 'w-10', 'windows10', 'win10', 'w10', 'windows', 'win', 'w'],min_os_version=Version('10.0.19045'),max_os_version=Version('10.0.19045')), PackageEntry('enit-zedfree-csn','22.4-2' maturity='PROD',target_os='windows'), 'Traceback (most recent call last):\n  File "C:\\Program Files (x86)\\wapt\\common.py", line 5192, in install\n    result = self.install_wapt(p.localpath,\n  File "C:\\Program Files (x86)\\wapt\\common.py", line 4176, in install_wapt\n    raise e\n  File "C:\\Program Files (x86)\\wapt\\common.py", line 4083, in install_wapt\n    exitstatus = setup.install()\n  File "C:\\Windows\\TEMP\\wapt3jnfq_t8\\setup.py", line 40, in install\n  File "C:\\Windows\\TEMP\\wapt3jnfq_t8\\setup.py", line 20, in install_exe\n  File "C:\\Program Files (x86)\\wapt\\common.py", line 4033, in new_func\n    return func(*args, **kwargs)\n  File "C:\\Program Files (x86)\\wapt\\setuphelpers_windows.py", line 1495, in install_exe_if_needed\n    run(r\'"%s" %s\' % (exe, silentflags), accept_returncodes=accept_returncodes, timeout=timeout, pidlist=pidlist)\n  File "C:\\Program Files (x86)\\wapt\\waptutils.py", line 2118, in run\n    raise CalledProcessErrorOutput(proc.returncode, cmd, \'\'.join(output))\nwaptutils.CalledProcessErrorOutput: Command \'"Setup ZEDFREE 2022.4 x64.exe" /S /v/qn\' returned non-zero exit status 1619.\nOutput:\n']]
Traceback (most recent call last):
  File "C:\Program Files (x86)\wapt\waptservice\service.py", line 1910, in run
    self.running_task.run()
  File "C:\Program Files (x86)\wapt\waptservice\waptservice_common.py", line 716, in run
    self._run()
  File "C:\Program Files (x86)\wapt\waptservice\waptservice_common.py", line 1288, in _run
    raise Exception(_('Error during install of {}: errors in packages {}').format(
Exception: Erreur lors de l'installation de ['enit-zedfree-csn']: erreurs dans les paquets [[PackageRequest(package='enit-zedfree-csn',architectures=['x64'],locales=['fr'],maturities=['PROD'],tags=['windows-10', 'win-10', 'w-10', 'windows10', 'win10', 'w10', 'windows', 'win', 'w'],min_os_version=Version('10.0.19045'),max_os_version=Version('10.0.19045')), PackageEntry('enit-zedfree-csn','22.4-2' maturity='PROD',target_os='windows'), 'Traceback (most recent call last):\n  File "C:\\Program Files (x86)\\wapt\\common.py", line 5192, in install\n    result = self.install_wapt(p.localpath,\n  File "C:\\Program Files (x86)\\wapt\\common.py", line 4176, in install_wapt\n    raise e\n  File "C:\\Program Files (x86)\\wapt\\common.py", line 4083, in install_wapt\n    exitstatus = setup.install()\n  File "C:\\Windows\\TEMP\\wapt3jnfq_t8\\setup.py", line 40, in install\n  File "C:\\Windows\\TEMP\\wapt3jnfq_t8\\setup.py", line 20, in install_exe\n  File "C:\\Program Files (x86)\\wapt\\common.py", line 4033, in new_func\n    return func(*args, **kwargs)\n  File "C:\\Program Files (x86)\\wapt\\setuphelpers_windows.py", line 1495, in install_exe_if_needed\n    run(r\'"%s" %s\' % (exe, silentflags), accept_returncodes=accept_returncodes, timeout=timeout, pidlist=pidlist)\n  File "C:\\Program Files (x86)\\wapt\\waptutils.py", line 2118, in run\n    raise CalledProcessErrorOutput(proc.returncode, cmd, \'\'.join(output))\nwaptutils.CalledProcessErrorOutput: Command \'"Setup ZEDFREE 2022.4 x64.exe" /S /v/qn\' returned non-zero exit status 1619.\nOutput:\n']]
Thank you in advance.

Re: Wapt packet execution error 1619

Published: October 12, 2023 - 5:49 PM
by dcardon
Hello Benoit,

You should test the installation under a LOCAL SYSTEM account to see what is crashing (the WAPT agent runs as a LOCAL SYSTEM).

To do this, you can install the tis-sysinternals-pstools package and then launch a cmd as a system account (to be launched in a cmd with elevated privileges)

Code: Select all

psexec -s -i cmd.exe
Then launch the installation of your package in this cmd and see what crashes.

Error code 1619 suggests a corrupted MSI file, which is a rather strange error code....

Sincerely,
Denis

Re: Wapt packet execution error 1619

Published: October 13, 2023 - 09:36
by Benoit
Hello @dcardon,

Thank you for your feedback.

I installed the sysinternals-pstools package.
I launch a command prompt as administrator and then type the command: "psexec -a -i cmd.exe"
In return, I received the following message:

Code: Select all

C:\Windows\system32>psexec -s -i cmd.exe

PsExec v2.43 - Execute processes remotely
Copyright (C) 2001-2023 Mark Russinovich
Sysinternals - www.sysinternals.com

Error communicating with PsExec service on ******:
Il nÆy a pas de processus Ó lÆautre extrÚmitÚ du canal.
Can you explain how to do it?

ps: the asterisks correspond to my hostname

Sincerely,

Re: Wapt packet execution error 1619

Published: October 16, 2023 - 4:25 PM
by Benoit
I solved the psexec problem by using a VM.

However, I still cannot install the package as a system.
Here is the error message:

Code: Select all

C:\Program Files (x86)\wapt>whoami
autorite nt\système

C:\Program Files (x86)\wapt>wapt-get install enit-zedfree-csn
Using config file: C:\Program Files (x86)\wapt\wapt-get.ini
installing WAPT packages enit-zedfree-csn
Installing enit-zedfree-csn(=22.4-3)
2023-10-16 16:21:50,473 CRITICAL Package enit-zedfree-csn [x64_fr_PROD] not installed due to errors : EWaptCorruptedFiles: Error in package enit-zedfree-csn(=22.4-3) in C:\Windows\TEMP\waptoj9p_rvs, files corrupted, SHA not matching for ['.env', '.vscode/launch.json', '.vscode/settings.json']

Results :

 === install packages ===
  enit-zedfree-csn [x64_fr_PROD] | enit-zedfree-csn (22.4-3)

 === errors packages ===
  enit-zedfree-csn [x64_fr_PROD] | enit-zedfree-csn (22.4-3)

[SOLVED] Re: Wapt packet execution error 1619

Published: October 17, 2023 - 1:50 PM
by Benoit
Good morning,

I contacted the software provider and it appears that the executable is not designed to be installed by the system account.
They advised me to decompress the executable and re-enter the msi file.
So I retrieved the MSI file and created the following script:

Code: Select all

# -*- coding: utf-8 -*-


"""
Import des modules
"""
from setuphelpers import *
import subprocess


"""
Déclaration des variables
"""
# Nom de l'application et du fichier MSI
name_app = "ZEDFREE"
name_msi = "ZEDFREE 2022.4 x64.msi"



"""
Déclation des fonctions
"""
# Fonction pour désinstaller l'application
def uninstall():
    #commande de déinstallation du Msi
    command = f'msiexec /x "{name_msi}" /quiet'
    try:
        subprocess.run(command, shell=True)
        print(f"{name_app} a bien été désinstallé")
    except:
        print(f"Une erreur s'est produite lors de la désinstallation de {name_app}")

# Fonction pour installer l'application
def install_app():
    try:
        print(f"Installation en cours : {name_msi}")
        install_msi_if_needed(name_msi)
        print(f"L'installation de {name_app} s'est bien déroulée")
    except:
        print(f"Une erreur s'est produite lors de l'installation de {name_app}")

"""
main code
"""
def install():
    software_installed = False

    # Boucle pour vérifier si l'application est déjà installée
    for software in installed_softwares():
        if software["name"] == name_app:
            software_installed = True
            if software_installed == True:
                try:
                    print(f"{name_app} est déjà installé. Il va être désinstallé")
                    uninstall()
                except:
                    print(f"L'application {name_app} n'a pas été désinstallée")

                try:
                    print(f"{name_app} va être réinstallé")
                    install_app()
                except:
                    print(f"{name_app} n'a pas pu être installée")

            break

    # Si l'application n'est pas installée, l'installer
    if software_installed == False:
        install_app()

Re: [SOLVED] Wapt packet execution error 1619

Published: October 17, 2023 - 2:35 PM
by dcardon
Hi again Benoit,

regarding PsExec, the next step was to run the executable installation directly from the command line. It might display more explicit error messages.

One issue that can arise with the SYSTEM environment versus the local Administrator environment is that SYSTEM doesn't have a desktop. Some software tries, for example, to create an icon on the desktop of the user running the installer, but this doesn't work in the case of LOCAL SYSTEM (a workaround is to create a desktop directory for SYSTEM for the duration of the installation).

Anyway, if your software developer found a solution, that's great. It's likely that the executable that extracts the MSI file is doing so in a location where SYSTEM doesn't normally write.

Thank you for your feedback,

Best regards,

Denis