Driver installation using pnputil.exe

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

May 17, 2017 - 11:20

Good morning,
I'm trying to install a driver from a wapt package, but I'm getting the error "Warning: CalledProcessErrorOutput()"
The command "pnputil.exe -i -a CESG502.INF" works in manual mode.

Code: Select all

currentpath = os.path.dirname(os.path.realpath(__file__))
run_notfatal(r'C:\Windows\System32\pnputil.exe -i -a %s\Driver\CESG502.INF' % currentpath)
 
User avatar
btravers
Messages: 30
Registration: Sep 25, 2017 - 07:02

June 11, 2018 - 06:08

Hello, for your information, I successfully installed drivers using the Microsoft DevCon.exe utility.
In my case, I had to force the driver installation to perform a downgrade.

Example command:
devcon updateni c:\windows\inf\test.inf *PNP0501
3 x Server: Debian 9.6
104 + 8 + 3 Remote Windows Repositories
Wapt: 1.6.2.7 Enterprise
Console: Windows 10 Pro
Gaelds
Messages: 254
Registration: Nov 22, 2015 - 08:37

November 23, 2018 - 12:19

I'm going to test devcon, but where did you find your hardware ID "*PNP0501"? For example, to install a USB driver, do I need to take an extract from this string?

%USB\VID_0403&PID_BD90.DeviceDesc%=FtdiBus.NT,USB\VID_0403&PID_BD90

EDIT: I tried devcon on the installation of a USB cable driver

but the following command returns "devcon_x64.exe failed.":

Code: Select all

C:\tmp\dst-autologger_3.3.0.274-4_all\devcon_x64.exe updateni C:\tmp\dst-autologger_3.3.0.274-4_all\ftdibus.inf *PID_BD90*
The full hardware ID of the device appears to be "FTDIBUS\COMFORT&VID_0403&PID_BD90".
Last edited by gaelds on 26 Nov 2018 - 10:34, edited 2 times.
User avatar
htouvet
WAPT Expert
Messages: 436
Registration: March 16, 2015 - 10:48
Contact :

November 23, 2018 - 3:08 PM

With pnputil; there's a good chance it will be necessary to disable the wow6432 redirection:

Code: Select all

def install():
    with disable_file_system_redirection():
        run(r'C:\Windows\System32\pnputil.exe -i -a "%s\Driver\CESG502.INF"' % basedir)
Tranquil IT
lfkl
Messages: 23
Registration: Apr 11, 2019 - 05:51

October 17, 2020 - 06:17

Hello,

I'm having the same problem installing this driver.
Did you resolve the issue and would you be willing to share the script?
I haven't been able to get it to work...

Best regards.
User avatar
btravers
Messages: 30
Registration: Sep 25, 2017 - 07:02

October 19, 2020 - 00:11

Sorry, I didn't make that package.
3 x Server: Debian 9.6
104 + 8 + 3 Remote Windows Repositories
Wapt: 1.6.2.7 Enterprise
Console: Windows 10 Pro
Gaelds
Messages: 254
Registration: Nov 22, 2015 - 08:37

November 4, 2020 - 6:52 AM

lfkl wrote: Oct 17, 2020 - 6:17 AM Hello,

I'm having the same problem installing this driver.
Did you resolve the issue and would you be willing to share the script?
I haven't been able to get it to work...

Best regards.
Hello, for example I have this Casio package:

Code: Select all

# -*- coding: utf-8 -*-
from setuphelpers import *
uninstallkey = ['{92A68E3F-F40B-472C-9F93-2729EBBF08DA}']

def install():
    install_msi_if_needed('GRAPH35PLUS.msi',properties=" /L \'1036\' ISX_INSTALLKEY=XXXXXXXXXXXX")

    # Installation du pilote
    with disable_file_system_redirection():
        run_notfatal(r'C:\Windows\System32\pnputil.exe -i -a "%s\Driver\CESG502.INF"' % basedir)

def uninstall():
        print('Desinstallation de Casio 35+ Manager+')
        remove_file(makepath(common_desktop(),'Logiciels','Mathematiques','GRAPH 35+ Manager PLUS.lnk'))
Gaelds
Messages: 254
Registration: Nov 22, 2015 - 08:37

November 4, 2020 - 6:56 AM

Or this Thymio package with dpinst and added certificates:

Code: Select all

# -*- coding: utf-8 -*-
from setuphelpers import *
global destdir
destdir = makepath(programfiles,'Thymio')
uninstallkey = []
uninstallstring = ['C:\Program Files\Thymio\Uninstall.exe /S /D="C:\Program Files\Thymio"']

def install():
    currentpath = os.path.dirname(os.path.realpath(__file__))
    print('Installation de Thymio Suite')
    print('Installation des Certificats Mobsya')
    run(r'C:\Windows\System32\certutil.exe -addstore "TrustedPublisher" %s\Mobsya.cer' % currentpath)
    run(r'C:\Windows\System32\certutil.exe -addstore "TrustedPublisher" %s\Mobsya2.cer' % currentpath)
    print('Installation des Pilotes Thymio')
    run_notfatal(r'%s\drivers\dpinst_x64.exe /S /F'  % currentpath)
    install_exe_if_needed("ThymioSuite-2.1.1-win64.exe",'/S',key='',min_version='2.0.0')
    create_shortcut(makepath(common_desktop(),'Logiciels','Informatique Programmation','Thymio Suite.lnk'),target=r'%s\bin\thymio-launcher.exe' %destdir, wDir=destdir,icon=r'%s\thymio-launcher.ico' %destdir)

Locked