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

November 27, 2023 - 11:39

Good morning,

I'm trying to create a package for the Crouzet "Virtual Display" software. I based it on my Crouzet Soft and Touch Soft packages, which also install drivers, but I still have these two screens when Setup_CVD_PC_V2_3_01_02.exe is launched (see attached image).

In my package, I copied the "DriverUSB" driver directory from "C:\Program Files (x86)\Crouzet automation\Crouzet Virtual Display\". I tried installing the drivers using pnputil or dpinst, but I get the same screens. By manually clicking "Next" and "Finish", the package completes the installation without errors.

Here is the install() function:

Code: Select all

def install():
    print(r'Installation du certificat Crouzet et SiliconLabs')
    currentpath = os.path.dirname(os.path.realpath(__file__))
    run(r'C:\Windows\System32\certutil.exe -addstore "TrustedPublisher" %s\crouzet.cer' % currentpath)
    run(r'C:\Windows\System32\certutil.exe -addstore "TrustedPublisher" %s\siliconlabs.cer' % currentpath)

    print(r'Installation des pilotes USB')
    with disable_file_system_redirection():
        run(r'C:\Windows\System32\pnputil.exe -i -a "%s\DriverUSB\x64\ftdibus.inf"' % basedir)
        run(r'C:\Windows\System32\pnputil.exe -i -a "%s\DriverUSB\x64\ftdiport.inf"' % basedir)
        run(r'C:\Windows\System32\pnputil.exe -i -a "%s\DriverUSB\windrv_BLE\x64\dfu.inf"' % basedir)
        run(r'C:\Windows\System32\pnputil.exe -i -a "%s\DriverUSB\windrv_BLE\x64\usbserial.inf"' % basedir)

    #run_notfatal(r'%s\DriverUSB\windrv_BLE\x64\dpinst.exe /S /F'  % currentpath)
    #run_notfatal(r'%s\DriverUSB\x64\dpinst.exe /S /F'  % currentpath)

    print(u'Installation de %s' % app_name)
    run_notfatal('Setup_CVD_PC_V2_3_01_02.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-')
Attachments
2.jpg
2.jpg (42.95 KB) Viewed 5068 times
1.jpg
1.jpg (29.11 KB) Viewed 5068 times
cbaziret
Messages: 5
Registration: Sep 28, 2023 - 3:46 p.m.

December 4, 2023 - 11:50 AM

Hello,

we tried installing the software ourselves and we're having the same problem. The issue is that the installer will launch the driver installation regardless of whether they're already installed or not, and it's not a silent installation.

My solution would be to perform a silent driver installation followed by a portable installation of the software.

For the portable installation, you just need to install the software once, retrieve the source files from "C:\Program Files (x86)\Crouzet automation\Crouzet Virtual Display" and move them into the same folder.
Clément BAZIRET - Tranquil IT,
Package Creator
Gaelds
Messages: 254
Registration: Nov 22, 2015 - 08:37

December 4, 2023 - 1:19 PM

Thanks for the info! I wouldn't have thought that these Crouzet software programs could be made portable.
Gaelds
Messages: 254
Registration: Nov 22, 2015 - 08:37

January 15, 2024 - 2:45 PM

If it helps anyone, here's an example of a working setup.py file to "install" Crouzet Virtual Display (copying the installation folder and drivers). It obviously needs improvement/customization.

Code: Select all

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

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

def install():
    #print(r'Désinstallation de l\'ancienne version')
    run_notfatal(uninstall_string)
    print(r'Installation des pilotes USB')
    currentpath = os.path.dirname(os.path.realpath(__file__))
    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(r'Copie du dossier %s' % app_dir_binaries)
    killalltasks(kill_list)
    if not isdir(app_dir_binaries):
        mkdirs(app_dir_binaries)
    copytree2(app_name, app_dir_binaries,onreplace = default_overwrite)
    print(r'Création 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"Suppression de %s" %app_name)
    killalltasks(kill_list)
    if isdir(app_dir_binaries):
        remove_tree(app_dir_binaries)
    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")
Answer