Page 1 of 1

Driver installation using pnputil.exe

Published: May 17, 2017 - 11:20
by gaelds
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)
 

Re: Driver installation with pnputil.exe

Published: June 11, 2018 - 06:08
by btravers
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

Re: Driver installation with pnputil.exe

Published: November 23, 2018 - 12:19 PM
by gaelds
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".

Re: Driver installation with pnputil.exe

Published: November 23, 2018 - 3:08 PM
by htouvet
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)

Re: Driver installation with pnputil.exe

Published: October 17, 2020 - 06:17
by lfkl
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.

Re: Driver installation with pnputil.exe

Published: October 19, 2020 - 00:11
by btravers
Sorry, I didn't make that package.

Re: Driver installation with pnputil.exe

Published: November 4, 2020 - 6:52 AM
by gaelds
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'))

Re: Driver installation with pnputil.exe

Published: November 4, 2020 - 6:56 AM
by gaelds
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)