Crouzet-Soft package problem

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
Gaelds
Messages: 254
Registration: Nov 22, 2015 - 08:37

November 30, 2022 - 11:11

Good morning,

I have a problem with a Crouzet Soft 1.12 package. The 'USB driver installation' part seems to go well and the software is installed on the machines, but the "Device Driver Installation Wizard" window appears and waits for a click on next, so the package ends with an error after 300s.


EDIT: My problem seems to be solved, but I don't know exactly what worked in my latest changes... In any case, if anyone needs this package, here's the setup.py file. The "DriverUSB" folder was copied from the software's installation folder.

Code: Select all

# -*- coding: utf-8 -*-
from setuphelpers import *
uninstallkey = []

app_name = 'Crouzet-Soft'
app_dir = makepath(programfiles32, 'Crouzet automation')
app_dir_binaries = makepath(app_dir,'Crouzet-Soft')
binary_name = "Crouzet-Soft.exe"
kill_list = [binary_name]
shortcutsdir = makepath(common_desktop(),'Logiciels','Elec - Automatisme')
uninstall_string = r'"C:\Program Files (x86)\Crouzet automation\Crouzet-Soft\unins000.exe" /silent'

def install():
    print(r'Désinstallation de l\'ancienne version')
    versionsoft = control['version'].split('-',1)[0]
    softname = 'Crouzet-Soft'
    check_installed_soft = installed_softwares(softname)

    if check_installed_soft:
        for uninstall in check_installed_soft:
            cmd = WAPT.uninstall_cmd(uninstall['key'])
            run(cmd)

    print(r'Installation des pilotes USB')
    currentpath = os.path.dirname(os.path.realpath(__file__))
    ##run_notfatal(r'%s\drivers\dpinst.exe /SW /F'  % currentpath)
    with disable_file_system_redirection():
        run_notfatal(r'C:\Windows\System32\pnputil.exe -i -a "%s\DriverUSB\x64\ftdibus.inf"' % basedir)
        run_notfatal(r'C:\Windows\System32\pnputil.exe -i -a "%s\DriverUSB\x64\ftdiport.inf"' % basedir)
        run_notfatal(r'C:\Windows\System32\pnputil.exe -i -a "%s\DriverUSB\windrv_BLE\x64\dfu.inf"' % basedir)
        run_notfatal(r'C:\Windows\System32\pnputil.exe -i -a "%s\DriverUSB\windrv_BLE\x64\usbserial.inf"' % basedir)

    print(u'Installation de %s' % app_name)
    install_exe_if_needed('Setup_CrouzetSoft_1.12.02.07.exe',
        silentflags='/SILENT /VERYSILENT /SUPPRESSMSGBOXES /NORESTART',
        key='6BCD8694-FAB1-406E-83E4-263BAAD2B163_is1',
        min_version=' '
    )

    print(r'Creation du raccourci %s sur le bureau public' %app_name)
    if not isdir(shortcutsdir):
        mkdirs(shortcutsdir)
    create_shortcut(makepath(shortcutsdir,'%s.lnk' %app_name), target=makepath(app_dir_binaries,binary_name))
    remove_desktop_shortcut(app_name)


def uninstall():
    print(r"Desinstallation de %s" %app_name)
    run_notfatal(r'%s' % uninstall_string)
    if  isfile(makepath(shortcutsdir,'%s.lnk' %app_name)):
        remove_file(makepath(shortcutsdir,'%s.lnk' %app_name))

def audit():
    if isfile(makepath(app_dir_binaries,binary_name)):
        return("OK")
        
    
Attachments
2022-11-29 12_03_54-Greenshot.jpg
2022-11-29 12_03_54-Greenshot.jpg (43.1 KB) Viewed 3120 times
Locked