Bagikan melalui


Menjalankan InfVerif dari Baris Perintah

Topik ini mencantumkan opsi yang tersedia saat Anda menjalankan InfVerif.exe dari baris perintah.

Catatan

InfVerif mengharuskan setiap jalur gabungan dan nama file harus kurang dari 260 karakter.

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.

Untuk informasi tentang kode kesalahan, lihat Kesalahan dan Peringatan Validasi INF

Opsi verbose menambahkan baris ke output yang menentukan apakah INF valid atau tidak. Argumen tertentu ditandai sebagai mode, di mana hanya satu yang harus diteruskan.

Untuk contoh pemformatan TargetOSVersion , lihat bagian Keterangan dari Bagian Produsen INF.

Untuk memvalidasi beberapa file INF, berikan beberapa nama file atau gunakan kartubebas:

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

Baru untuk Windows 10, versi 1703: Opsi info sangat berguna untuk memverifikasi penerapan INF. Ini melaporkan setiap ID perangkat keras yang didukung bersama dengan arsitektur yang valid dan versi OS minimum. Anda dapat menggunakan /info dan /osver bersama-sama untuk memvalidasi penerapan INF di seluruh versi dan arsitektur OS.

Baru untuk Windows 10, versi 1809: Jika Anda mengembangkan Driver Windows, gunakan infverif /w (idealnya dengan /v) untuk menentukan kompatibilitas dengan prinsip deklaratif (D) Prinsip Desain DCH. Bendera /w ini juga memeriksa apakah INF mematuhi persyaratan isolasi paket driver untuk Memulai Driver Windows.

Windows 11 baru, versi 24H2: Argumen '/code' baru diperkenalkan untuk memberikan detail yang diperluas tentang kode kesalahan. Mode baru 'infverif /h' diperkenalkan untuk menentukan apakah file INF memenuhi persyaratan untuk Hardware Dev Center ke WHQL menandatangani paket driver. Untuk detail tambahan tentang 'infverif /h', lihat InfVerif /h.

Tugas InfVerif dan MSBuild

MSBuild menjalankan InfVerif sebagai tugas secara otomatis, tepat setelah tugas Stampinf. Ini menggunakan Platform Target di properti proyek (Configuration Properties-Driver> Pengaturan) untuk mengonfigurasi secara otomatis sebagai berikut:

  • Platform Target = Penggunaan desktop InfVerif /h
  • Platform Target = Penggunaan universal InfVerif /u
  • Platform Target = Windows Driver menggunakan InfVerif /w

Tidak dimungkinkan untuk mengubah pemanggilan otomatis tersebut. Jika Anda ingin menggunakan pengaturan lain yang dijelaskan di atas, Anda dapat menjalankan InfVerif sebagai InfVerif.exe mandiri atau panggilan menggunakan target kustom dalam file .vcxproj.