windowsdriver-signingdpinst

'dpinst /silent' fails on Windows XP with signed (but not WHQL) drivers


Driver Package Installer (DPInst) with the "/s" (silent) flag fails to install a signed driver on Windows XP. The certificate is a valid one (an Authenticode certificate) but not a WHQL one. How can I fix this problem?


Solution

  • DPInst has two "silencing" flags -- /q (Quiet) and /sw (Supress Wizard). /q implies Quiet but also probably (I didn't test!) sets DI_QUIETINSTALL when issuing the DIF_REMOVE request. Apparently this makes the SetupAPI library (of Windows XP) go "they're trying to go sneaky on me!" and reject the installation if the certificate isn't a treasured WHQL[*] one.

    Note that DPInst itself ignores the certificate's validity when the /lm (Legacy Mode) flag is set, but it's the underlying Windows that'll reject it still.

    The solution is to use the /sw flag (along with /lm).

    BTW, I'm still yet to check the implications of this - e.g. does Windows pop-up a "STOP Installation" prompt box under some configurations? I'll test and update this answer accordingly.

    The "STOP Installation" prompt" looks like:

    Sole window displayed under some circumstances for commandline flag "/sq /lm"

    [*] ... or another Windows System Component Verification certificate, but that's besides the point.