Page 1 of 1

Crouzet Virtual display package

Published: November 27, 2023 - 11:39 AM
by gaelds
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-')

Re: Crouzet Virtual display package

Published: December 4, 2023 - 11:50 AM
by cbaziret
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.

Re: Crouzet Virtual display package

Published: Dec 4, 2023 - 1:19 PM
by gaelds
Thanks for the info! I wouldn't have thought that these Crouzet software programs could be made portable.

Re: Crouzet Virtual display package

Published: January 15, 2024 - 2:45 PM
by gaelds
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")