Windows 7 way to figure out if a driver is digitally signed

Discussion in 'Programming and Scripting' started by Alam, Aug 12, 2010.

  1. Alam

    Alam New Member

    Joined:
    Aug 12, 2010
    Messages:
    4
    Likes Received:
    0
    I am looking for a way to figure out if a driver is digitally signed. I use the api SetupVerifyInfFile for this, but this always fails with the error "Parameter is incorrect". Following are the parameters that I pass to this function,

    InfName - The Path of the Inf file with the file name. (say, "C:\Windows\..\xxx.inf") and NULL for AltPlatformInfo.

    Am not sure why this fails with 'Parameter Incorrect' though the inf file is present in the path that is passed to the api. Am I missing out on something here?

    Does anyone have ideas on this?
     
  2. CommonTater

    CommonTater New Member

    Joined:
    Jul 21, 2010
    Messages:
    868
    Likes Received:
    36
    If a driver is not digitally signed windows is going to tell you and give you the chance to cancel the installation.

    3rd party tools are often ineffectual due to revisions in the INF file structure... New keywords, etc.
     
  3. Alam

    Alam New Member

    Joined:
    Aug 12, 2010
    Messages:
    4
    Likes Received:
    0
    I use the functions UploadPrinterDriverPackage and InstallPrinterDriverFromPackage in my code to upload the the driver to the driver store and install it. But these functions do not seem to work for unsigned drivers and I am not given a chance to cancel the installation.
     
  4. cybercore

    cybercore New Member

    Joined:
    Jul 7, 2009
    Messages:
    15,823
    Likes Received:
    321
    To detect unsigned drivers, Start --> In the search box type: sigverif --> Press "Enter"



    I haven't used SetupVerifyInfFile api, and I don't know in exactly what cases SP_ALTPLATFORM_INFO_V2 can be null. You can specify it as shown there:

    Code:
    typedef struct _SP_ALTPLATFORM_INFO_V2 {
      DWORD cbSize;
      DWORD Platform;
      DWORD MajorVersion;
      DWORD MinorVersion;
      WORD  ProcessorArchitecture;
      WORD  Flags;
      DWORD FirstValidatedMajorVersion;
      DWORD FirstValidatedMinorVersion;
    } SP_ALTPLATFORM_INFO_V2, *PSP_ALTPLATFORM_INFO_V2;
    
     
    CommonTater and (deleted member) like this.

Share This Page

Loading...