2011年9月29日 星期四

ChkInf使用方法

DDK中提供了ChkInf的Tool幫助開發人員檢查Inf檔有無問題
但是要使用該Tool時卻不知道該如何著手!
根據DDK的說明文件,開啟一個command視窗來執行ChkInf.bat時,卻發生以下的錯誤:
'perl.exe'不是內部或外部命令、可執行的程式或批次檔

經過一番研究後終於找到該如何使用該Tool...(DDK的Help寫得真是....好)
正確的使用方法是從程式集中打開一個Build Environment
例如我的開發環境是WinXP,則打開WinXP下的Build Environment

再進入 %DDKRoot%\Tools\Chkinf 的資料夾下,執行ChkInf.bat即可
執行完之後,ChkInf分析的結果會存到 %DDKRoot%\Tools\Chkinf\htm 的資料夾下
以下為ChkInf的參數說明:

Syntax

chkinf {INFFile [INFFile...] | Directory} [/L LogFile] [/B] [/LO] [/DC Options]

Parameters

INFFilet
Specifies the fully qualified path and file names of one or more INF files. ChkINF verifies the specified files. You can use the wildcard character (*) to specify multiple files, for example, *net.inf.
Directory
Specifies a directory that contain INF Files. ChkINF examines all INF files in the directory. You cannot use the wildcard character (*) in a directory name.
/L TextFile
Creates a results file in text format, in addition to the HTML files. The text file includes results for all INF files that were validated. TextFile specifies a path and file name for the resulting file. There is no default name or location. If you do not specify a file name, ChkINF does not create a text file.If you do not specify a path, ChkINF creates the text file in the current directory, not in the htm subdirectory with its other output files.
/B
Displays the results when command completes. If ChkINF is validating one INF file, ChkINF displays the results for that INF file. If ChkINF is validating more than one file, it displays the summary of results.
/A
Overwrites the results files from previous runs without prompting the user.
/LO
Determines whether the INF file conforms to the layout rules defined in the layout.inf file. This test is designed for printer INF files and files that are included in Windows.
/DC Options
Specifies the device class-specific options that ChkINF should use when checking INF files. At present, the only supported option is NOFAX, which instructs ChkINF not to check any Fax keys present in modem INF files.

PS:不需要到www.perl.org download Perl來安裝喔,安裝之後還是不能使用ChkInf的...^^

沒有留言:

張貼留言