Share via


コマンドラインからの InfVerif の実行

このトピックでは、コマンド ラインからInfVerif.exeを実行するときに使用できるオプションの一覧を示します。

Note

InfVerif では、各結合パスとファイル名が 260 文字未満である必要があります。

USAGE: InfVerif.exe [/code <error code>] [/v] [[/h] | [/w] | [/u] | [/k]]
                    [/rulever <Major.Minor.Build> | vnext]
                    [/wbuild <Major.Minor.Build>] [/info] [/stampinf]
                    [/l <path>] [/osver <TargetOSVersion>] [/product <ias file>]
                    [/provider <ProviderName>] <files>

/code <error code>
        Display help information for an error code.

/v
        Display verbose file logging details.

/h
        Reports errors using WHQL Signature requirements. (mode)

        This mode uses requirements that always align with the requirements
        to get a WHQL signature, current as of this InfVerif version. These
        requirements may change build-to-build.

        This mode can be combined with '/rulever vnext' to preview proposed
        future requirements.

/w
        Reports errors using Windows Driver requirements. (mode)

/u
        Reports errors using Universal Driver requirements. (mode)

/k
        Reports errors using Declarative Driver requirements. (mode)

/wbuild <Major.Minor.Build>
        For Windows Drivers that have downlevel support, specifies
        the build number where /w should be enforced.
        Defaults to 10.0.17763

/rulever <Major.Minor.Build>
        To use a previous or future version of InfVerif enforcement, specifies
        the build number to use rule enforcement from.
        Defaults to the current InfVerif version

/info
        Displays INF summary information.

/stampinf
        Treat $ARCH$ as a valid architecture, to validate
        pre-stampinf files.

/l <path>
        An inline-annotated HTML version of each INF
        file will be placed in the <path>.

/osver <TargetOsVersion>
        Process the INF for only a specific target OS.
        Formatting is the same as a Models section, i.e. NTAMD64.6.0

/product <ias file>
        Validates all include/needs directives against
        the product definition in the ias file.

/provider <ProviderName>
        Reports an error for INFs not using the specified provider name.

<files>
        A space-separated list of INF files to analyze.
        All files must have .inf extension.
        Wildcards (*) may be used.

Only one mode option may be passed at a time.

エラー コードの詳細については、「INF 検証エラーと警告」をご参照ください 。

詳細オプションは、INF が有効かどうかを指定する行を出力に追加します。 特定の引数はモードとしてタグ付けされ、1 つのみを渡す必要があります。

TargetOSVersion の書式設定の例については、「INF メーカー」セクションの「解説」セクションをご参照ください。

複数の INF ファイルを検証するには、複数のファイル名を指定するか、ワイルドカードを使用します:

infverif.exe /w test1.inf test2.inf
infverif.exe /w test*.inf

Windows 10 バージョン 1703 の新機能: 情報オプションは、INF の適用性を確認するのに特に役立ちます。 サポートされている各ハードウェア ID と、有効なアーキテクチャと最小 OS バージョンが報告されます。 /info と /osver を一緒に使用して、OS のバージョンとアーキテクチャ全体で INF の適用性を検証できます。

Windows 10 バージョン 1809 の新機能:Windows ドライバーを開発する場合は、 DCH 設計原則宣言型 (D) 原則との互換性を判断するために infverif /w (理想的には /v) を使用します。 この /w フラグは、INFが「Windowsドライバーの概要」の ドライバー パッケージ分離 要件に準拠しているかどうかも確認します。

Windows Insider Preview ビルド 26080 以降の新機能: エラー コードに関する拡張された詳細を提供するために、新しい '/code' 引数が導入されました。 新しいモード 'infverif /h' が導入され、INF ファイルがドライバー パッケージに署名する WHQL へのハードウェア デベロッパー センターの要件を満たしているかどうかを判断します。 'infverif /h' の詳細については、 InfVerif /hを参照してください。

InfVerif タスクと MSBuild タスク

MSBuild は、 Stampinf タスクの直後に InfVerif をタスクとして自動的に実行します。 プロジェクト プロパティ (Configuration Properties->Driver 設定) の ターゲット プラットフォーム を使用して、次のように自動構成します。

  • ターゲット プラットフォーム = デスクトップの使用 InfVerif /h
  • ターゲット プラットフォーム = ユニバーサルの使用 InfVerif /u
  • ターゲット プラットフォーム = Windows ドライバーの使用 InfVerif /w

その自動呼び出しを変更することはできません。 上記の他の設定を使用する場合は、InfVerif をスタンドアロンとして実行するか、.vcxproj ファイル内のカスタム ターゲットを使用して InfVerif.exe を呼び出すことができます。