我们目前正在开发基于Jungo的WinDriver(并非真正重要的部分)框架的Windows设备驱动程序。我们拥有VeriSign证书,签名过程或驱动程序功能没有任何问题。
但是,在安装测试期间(在Windows 7上),我们看到一些关于Windows安全性对话框的奇怪行为,要求在驱动程序安装期间进行安装确认。
在该对话框中,似乎显示了3个字段(ASCII'fied quote):
+----------------------------------------------------------------------+
| Windows Security |
+----------------------------------------------------------------------|
| Would you like to install this device software? |
| |
| Name: <SOMETHING A> <SOMETHING B> |
| Publisher: <COMPANY> |
| |
+----------------------------------------------------------------------+
| <> Always trust software from "<COMPANY>" [INSTALL] [DON'T INSTALL] |
+----------------------------------------------------------------------|
| Security info / warning etc. |
+----------------------------------------------------------------------+
现在出于某种原因,<SOMETHING A>
和<SOMETHING B>
是相同的文字。这让对话看起来有点奇怪。这些信息来自INF文件(至少我现在所相信的那样),但到目前为止,我找不到有关它从何处获取的详细信息。
现在它看起来像是为了某些未知(至少对我而言)两次重复INF文件中“提供者”信息的内容。
有没有在这方面有更多经验的人(INF文件,驱动程序安装等)知道什么可能导致这种行为?
或许可以链接到这些对话框中有关INF文件中哪些信息的更多信息?
感谢您花时间阅读本文以及有关该问题的任何建议 -T
[小更新]
只有第一部分(<SOMETHING A>
)似乎来自INF。这使得原点或第二部分更加令人费解......
[更新2] 每个请求的INF副本(&lt; ...&gt;是内容编辑)
[Version]
Signature=$CHICAGO$
Provider=%PROVIDERNAME%
CatalogFile.NTamd64=<SOME CAT FILE NAME>.cat
DriverVer=<DATE>,<VERSION>
Class=<OUR COMPANY>
ClassGuid={<OUR CLASS ID>}
;---------------------------------------------------------------;
; Driver Information
;---------------------------------------------------------------;
[Manufacturer]
%PROVIDERNAME%=DeviceList,NTamd64
; x86 platform, Win9x, Windows 2000 and later
[DeviceList]
%DESCRIPTION%=DriverInstall,*<OUR DRIVER HANDLE>
; x64 platform, Windows XP x64 edition and later
[DeviceList.NTamd64]
%DESCRIPTION%=DriverInstall,*<OUR DRIVER HANDLE>
;---------------------------------------------------------------;
;---------------------------------------------------------------;
; Source/Destination Information
;---------------------------------------------------------------;
[DestinationDirs]
DefaultDestDir=10,System32\Drivers
[SourceDisksFiles]
<OUR DRIVER NAME>.sys=1
[SourceDisksNames]
;1=%INSTDISK%,,,.
;Delete the above line and uncomment the next line for WHQL
1 = %INSTDISK%,<SOME CAT FILE NAME>.cat,,
;---------------------------------------------------------------;
;---------------------------------------------------------------;
; Installation Section
;---------------------------------------------------------------;
; Installation script for Windows 2000 and later
[DriverInstall.NT]
CopyFiles=DriverCopyFiles
[DriverCopyFiles]
<OUR DRIVER NAME>.sys,,,0x22 ; COPYFLG_NOSKIP | COPYFLG_NO_VERSION_DIALOG
[DriverInstall.NT.hw]
AddReg=DriverHwAddReg
[DriverHwAddReg]
HKR,,SampleInfo,,""
; Register a new class in Windows 2000 and later
[ClassInstall32] ; Register a new class in Windows 2000 and later
AddReg=UpDateRegistry
[UpDateRegistry]
HKR,,,,<OUR COMPANY>
HKR,,Icon,,-5
; Add device driver service
[DriverInstall.NT.Services]
AddService=<OUR SERVICE NAME>, 0x00000002, DriverService
[DriverService]
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
StartType = 3 ; SERVICE_DEMAND_START
ErrorControl = 1 ; SERVICE_ERROR_NORMAL
ServiceBinary = %10%\system32\drivers\<OUR DRIVER NAME>.sys
;------------------------------------------------------------------------------
; String Definitions
;------------------------------------------------------------------------------
[Strings]
PROVIDERNAME=<THE NAME THAT SHOWS UP TWICE (BUT NOT REALLY)>
DESCRIPTION=<SOME DESCRIPTION>
INSTDISK="Driver Installation Disk"
<THE NAME THAT SHOWS UP TWICE (BUT NOT REALLY)>
显示<SOMETHING A>
。
但是,正如小更新1指出的那样,更改此值只会导致所述<SOMETHING A>
更改,但不会导致其他部分发生更改。
在改变一些东西进行测试后,<SOMETHING B>
中显示的值似乎“凭空而来”,因为我根本无法在驱动程序的INF或RC文件中找到它。 / p>
答案 0 :(得分:2)
与其他一些来源(感谢所有人在osronline.com上的ntdev [特别是Maxim])以及在注册表中的一些挖掘,我们相信我们终于能够解决对话框内容的来源。以下是我们发现的事情:
再次使用对话框示例:
+----------------------------------------------------------------------+
| Windows Security |
+----------------------------------------------------------------------|
| Would you like to install this device software? |
| |
| Name: <SOMETHING A> <SOMETHING B> |
| Publisher: <COMPANY> |
| |
+----------------------------------------------------------------------+
| <> Always trust software from "<COMPANY>" [INSTALL] [DON'T INSTALL] |
+----------------------------------------------------------------------|
| Security info / warning etc. |
+----------------------------------------------------------------------+
字段似乎解析如下:
<SOMETHING A>
似乎等于INF文件中“提供者”下的值
<SOMETHING B>
似乎有多个案例:
HKLM\SYSTEM\ControlSet001\Control\Class\<The GUID of your device class>
) <COMPANY>
似乎简单地等于用于签署驱动程序的证书的CN值。
也许还有一点,所以请随意添加其他信息。但希望这至少可以帮助某些人找到正确方向的相同信息。
答案 1 :(得分:0)
提示中的名称来自INF文件的DriverPackageDisplayName指令,发布者来自CAT文件中经过验证的签名。