Page 1 of 1

[SOLVED] Creating software packages with drivers

Published: June 20, 2017 - 2:54 PM
by Sebd
Hello.

I'd like to create packages for software like MPLABX or the Arduino suite.
However, these programs install drivers that prevent silent installation.

Either it simply doesn't work, or the driver installation windows open on the computer.

Do you have any ideas on how to get around this problem?

Sébd

Re: Creating software packages with drivers

Published: June 20, 2017 - 11:57 PM
by sfonteneau
Hello,

it is possible to deploy drivers with pnputil.exe.

The "TrustedPublisher" must be added during installation to avoid the yellow warning displayed when launching pnputil.

If a red warning appears (unsigned drivers), it is not possible to deploy the drivers silently.

In this case, you must re-sign the drivers with your own certificate. Then add them as a TrustedPublisher.

Example of a package where I did this:
https://wapt.lesfourmisduweb.org/detail ... 1_all.wapt

Simon

Re: Creating software packages with drivers

Published: June 22, 2017 - 12:06 PM
by Sebd
Good morning.

Thanks to your example, I was able to create a working package.
However, I had to install the kb2921916 patch for Windows 7 to get rid of the windows from one of the drivers.
No problems under Windows 10.

Code: Select all

def install():
    print('installing iutgeii-mplab-x-ide-v3.61')

    currentpath = os.path.dirname(os.path.realpath(__file__))
    if windows_version() < Version('6.2.0'):
        run_notfatal(r'C:\Windows\System32\wusa.exe %s\Windows6.1-KB2921916-x64.msu /quiet' % currentpath)

    run(r'C:\Windows\System32\certutil.exe -addstore "TrustedPublisher" %s\mplabx361.cer' % currentpath)
    run(r'C:\Windows\System32\certutil.exe -addstore "TrustedPublisher" %s\mplabx361-2.cer' % currentpath)
    run(r'C:\Windows\System32\certutil.exe -addstore "TrustedPublisher" %s\mplaxusb361-1.cer' % currentpath)
    run(r'C:\Windows\System32\certutil.exe -addstore "TrustedPublisher" %s\mplaxusb361-2.cer' % currentpath)
    run_notfatal(r'%s\x64\dpinst_x64.exe /S /F'  % currentpath)

    time.sleep(4)

    run(r'MPLABX-v3.61-windows-installer.exe --mode unattended')

    remove_desktop_shortcut('MPLAB X IDE v3.61.lnk')
    remove_desktop_shortcut('MPLAB driver switcher.lnk')
    remove_desktop_shortcut('MPLAB IPE v3.61.lnk')

Thank you for your help :)

Re: Creating software packages with drivers

Published: October 18, 2018 - 11:36 AM
by gaelds
sfonteneau wrote: June 20, 2017 - 11:57 PM Hello,

It is possible to deploy drivers with pnputil.exe.

The "TrustedPublisher" must be added during installation to avoid displaying the (yellow) warning when launching pnputil.

If a red warning is displayed (unsigned drivers), it is not possible to deploy the drivers silently.

In this case, you must re-sign the drivers with your own certificate. Then add them as a TrustedPublisher.

Example of a package where I did it:
https://wapt.lesfourmisduweb.org/detail ... 1_all.wapt

Simon
How did you create the "smp.cer" file?

Re: Creating software packages with drivers

Published: October 20, 2018 - 10:11 AM
by dcardon
Hello Gaelds,
gaelds wrote: Oct 18, 2018 - 11:36
sfonteneau wrote: June 20, 2017 - 11:57 PM Hello
...
In this case, you need to re-sign the driver with your own certificate. Then add it as a TrustedPublisher.
How did you create the "smp.cer" file?
It's a standard certificate with a code-signing option. You can create a certificate authority with OpenSSL, deploy it to your network using the package Simon provided, generate a code-signing certificate from this authority, and then sign it with your drivers.

Sincerely,

Denis

Re: Creating software packages with drivers

Published: November 26, 2018 - 09:13
by gaelds
dcardon wrote: Oct 20, 2018 - 10:11 It's a standard certificate with a code-signing option. You can create a certificate authority with OpenSSL, push it to your network using the package Simon mentioned, generate a code-signing certificate from that authority, and sign with your drivers.
Regards,
Denis
Sorry, but I didn't understand that answer. Are there procedures online for creating this type of certificate? And how is the trusted.reg file, which is added to the registry before pnputil in Simon's package, created?

Re: [SOLVED] Creating software packages with drivers

Published: January 28, 2019 - 1:58 PM
by gaelds
Hello,
could someone explain how to sign a driver with my own certificate? I'm having the same problem with an unsigned driver (red warning) using "EasyBuilder 8000" software, and I can't find any instructions online...