[RESOLVED] Bitdefender antivirus package - Error 1627 when creating a 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
Locked
tsille
Messages: 4
Registration: June 4, 2021 - 10:30

October 11, 2021 - 12:44

Hello, I'm currently putting together a package for installing our antivirus software
I asked the developer for the settings for a silent installation: epskit_x64.exe /bdparams /silent
When I specify this in pyscripter, I get an error Command 'epskit_x64.exe /bdparams /silent' returned non-zero exit status 1627.

I tried launching epskit_x64.exe /bdparams /silent in a command prompt and it works.
Does anyone have any idea what the problem might be?

Code: Select all

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

uninstallkey = ["Endpoint Security"]

##services_bitdefender = [r'Bitdefender Endpoint Agent',
##                        'Bitdefender Endpoint Integration Service',
##                        'Bitdefender Endpoint Protected Service',
##                        'Bitdefender Endpoint Redline Service',
##                        'Bitdefender Endpoint Security Service',
##                        'Bitdefender Endpoint Update Service']

services_bitdefender = [r'EPIntegrationService',
                        'EPProtectedService',
                        'EPRedline',
                        'EPSecurityService',
                        'EPUpdateService']

bitdefenderAppwiz = installed_softwares(r'Bitdefender Endpoint Security Tools')

def install():

##    if bitdefenderAppwiz and services_bitdefender:
##        print("Bitdenfender est déjà installé et fonctionnel, on saute l'installation")
##
##    else:
        print("Bitdefender n'apparait pas dans Ajout/suppression de programmes ou les services ne sont pas lancés, Bitdefender n'est pas installé : on installe")
##        run('msiexec /i eps_installer_signed.msi /qn GZ_PACKAGE_ID=aHR0cHM6Ly8xNzIuMTYuMTEuMzE6ODQ0My9QYWNrYWdlcy9CU1RXSU4vMC9XTURnS3UvaW5zdGFsbGVyLnhtbD9sYW5nPWZyLUZS REBOOT_IF_NEEDED=0')
        run(r'epskit_x64.exe /bdparams /silent')


def audit():
    # On vérifie que les services sont démarrés et que Bitdefender apparait dans appwiz.cpl
    if services_bitdefender and bitdefenderAppwiz:
    # On vérifie que les services Bitdefender sont démarrés
        print("Services Bitdefender démarrés")
        for services in services_bitdefender:
            service_is_running(services)
        pprint(services_bitdefender)
        print('')
        print(f'Bitdefender apparait dans Ajout/suppression de programmes')
        return "OK"

    else:
        print("Services Bitdefender installés")
        for services in services_bitdefender:
            service_installed(services)
        pprint(services_bitdefender)
        print('')
        print(f"Les services Bitdefender ne sont pas démarrés ou Bitdefender n'apparait pas dans appwiz.cpl")
        return "ERROR"
- Installed WAPT version: 2.1.0.10534
- Server OS: Linux Debian 10.10
- Administration/package creation machine OS: Windows 10
tsille
Messages: 4
Registration: June 4, 2021 - 10:30

October 12, 2021 - 09:05

Here is the package created thanks to a forum post and the help of Bitdefender support.
Currently, the uninstallation process is not silent and requires pressing a key to finalize the uninstallation.
If any of you know how to easily simulate this key press in the process, I'd appreciate it :D

Code: Select all

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


uninstallkey = ["Endpoint Security"]

##services_bitdefender = [r'Bitdefender Endpoint Agent',
##                        'Bitdefender Endpoint Integration Service',
##                        'Bitdefender Endpoint Protected Service',
##                        'Bitdefender Endpoint Redline Service',
##                        'Bitdefender Endpoint Security Service',
##                        'Bitdefender Endpoint Update Service']

services_bitdefender = [r'EPIntegrationService',
                        'EPProtectedService',
                        'EPRedline',
                        'EPSecurityService',
                        'EPUpdateService']

bitdefenderAppwiz = installed_softwares(r'Bitdefender Endpoint Security Tools')

def install():

    if bitdefenderAppwiz and services_bitdefender:
        print("Bitdenfender est déjà installé et fonctionnel, on saute l'installation")

    else:
        print("Bitdefender n'apparait pas dans Ajout/suppression de programmes ou les services ne sont pas lancés, Bitdefender n'est pas installé : on installe")
        run(u'epskit_x64.exe /bdparams /silent /configure "installer.xml',accept_returncodes=[1641,3010,0])

    if not isdir(makepath(programfiles,'Bitdefender','BitdefenderUninstall')):
        mkdirs(makepath(programfiles,'Bitdefender','BitdefenderUninstall'))
        print("Copie du fichier de désinstallation")
        filecopyto('BEST_uninstallTool.exe',makepath(programfiles,'Bitdefender','BitdefenderUninstall'))


def uninstall():

    print(r'Bitdender Gravity Zone : désinstallation en cours...')
    uninstallstring = ["C:\Program Files\Bitdefender\BitdefenderUninstall\Best_uninstallTool.exe"]

    x = r"/bdparams /noWait /silent"
##    y = "/password=monpassword"
    run(uninstallstring,x,accept_returncodes=[1641,3010,0])
##    run(uninstallstring,x,y,timeout=2000,accept_returncodes=[1641,3010,0])


    print('Nettoyage des fichiers de désinstallation.')
    remove_file(makepath(programfiles,'Bitdefender','BitdefenderUninstall','Best_uninstallTool.exe'))

    print('Suppression du dossier.')
    if dir_is_empty(makepath(programfiles,'Bitdefender','BitdefenderUninstall')):
        remove_tree(makepath(programfiles,'Bitdefender','BitdefenderUninstall'))


def audit():
    # On vérifie que les services sont démarrés et que Bitdefender apparait dans appwiz.cpl
    if services_bitdefender and bitdefenderAppwiz:
    # On vérifie que les services Bitdefender sont démarrés
        print("Services Bitdefender démarrés")
        for services in services_bitdefender:
            service_is_running(services)
        pprint(services_bitdefender)
        print('')
        print(f'Bitdefender apparait dans Ajout/suppression de programmes')
        return "OK"

    else:
        print("Services Bitdefender installés")
        for services in services_bitdefender:
            service_installed(services)
        pprint(services_bitdefender)
        print('')
        print(f"Les services Bitdefender ne sont pas démarrés ou Bitdefender n'apparait pas dans appwiz.cpl")
        return "ERROR"



- Installed WAPT version: 2.1.0.10534
- Server OS: Linux Debian 10.10
- Administration/package creation machine OS: Windows 10
Locked