无法在目标Windows 7 PC上安装virtualserial2示例UMDF驱动程序 [英] Unable to install virtualserial2 sample UMDF driver on target windows 7 PC

查看:639
本文介绍了无法在目标Windows 7 PC上安装virtualserial2示例UMDF驱动程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

作为我的开发机器&我的测试机器是带有Windows 7操作系统的64位Windows系统所以为自己提供了一个良好的开端我在Microsoft提供的Windows-driver-samples-master / serial / VirtualSerial2示例代码下编译了ComPort项目,初始它闪现一个错误,表示为遵循提供商不能微软,必须是创作INF的组织所以我将.inx文件MSFTUMDF = Microsoft中的以下行更改为MSFTUMDF = Sample,然后编译成功。



然后我按照以下流程在目标机器上安装驱动程序。



1)I从Windows-driver-samples-master \serial \ VirtualSerial2 \ ComPort \ x64 \Debug&中复制VirtualSerial2um.cer文件VirtualSerial2um.inf devcon.exe从C:\Program Files\Windows Kits \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ >
2)然后在目标机器上打开Internet Explorer我转到Internet选项 - > content->证书 - >导入然后我选择了VirtualSerial2um.cer文件&导入证书。



3)然后在目标机器上我以管理员身份打开命令提示符,浏览到Sample文件夹&输入以下命令。



devcon install virtualSerial2um.inf UMDF \ Virtual_1



然后在命令提示符下说:

设备树条目创建

devcon失败。




在设备管理器中出现未知设备COMn(n是com端口号)但是当我打开超级终端时COMn没有显示在COM端口的下拉列表中。



现在我无法弄清楚为什么我的devcon安装失败&因为它说我的驱动程序已在设备树中注册,然后为什么它显示在未知设备&不在PORTS



这是VirtualSerial2um.inf文件的内容



;

;版权所有(C)Microsoft Corporation,保留所有权利。

;

; VirtualSerial.inf

;

;安装说明:

;输入devcon install VirtualSerial2um.inf UMDF \ VirtualSerial2um进行安装



[版本]

Signature =$ Windows NT $

Class = Ports

ClassGuid = {4D36E978-E325-11CE-BFC1-08002BE10318}

Provider =%MSFTUMDF%

CatalogFile = WUDF.cat

DriverVer = 05/30 / 2016,19.7.52.160



[制造商]

%MSFTUMDF%= Microsoft,NTx86



[Microsoft.NTx86]

%VirtualSerialDeviceName%= VirtualSerial_Install,UMDF \ VirtualSerial2um < br $>


[SourceDisksFiles]

Virtualserial2um.dll = 1



[SourceDisksNames]

1 =%MediaDescription%



; =================== UMDF虚拟串口设备============================ ======



[VirtualSerial_Install.NT]

CopyFiles = UMDriverCopy



[VirtualSerial_Install.NT.hw]

AddReg = SetDeviceType_AddReg



[VirtualSerial_Install.NT.Services]

AddService = WUDFRd,0x000001fa,WUDFRD_ServiceInstall



[VirtualSerial_Install.NT.Wdf]

UmdfService = VirtualSerial,VirtualSerial_Install

UmdfServiceOrder = VirtualSerial

UmdfKernelModeClientPolicy = AllowKernelModeClients

UmdfFileObjectPolicy = AllowNullAndUnknownFileObjects

UmdfFsContextUsePolicy = CannotUseFsContexts



[VirtualSerial_Install]

UmdfLibraryVersion = 2.15.0

ServiceBinary =%12%\UMDF \ Virtualserial2um.dll



[WUDFRD_ServiceInstall]

DisplayName =%WudfRdDisplayName%

ServiceType = 1

StartType = 3

ErrorControl = 1

ServiceBinary =%12%\ WUDFRd.sys



[ SetDeviceType_AddReg]

HKR ,, DeviceType,0x10001,0x0000001b; 0x1b = FILE_DEVICE_SERIAL_PORT



[DestinationDirs]

UMDriverCopy = 12,UMDF;复制到drivers\UMDF



[UMDriverCopy]

Virtualserial2um.dll



; =================== Generic ============================== ====



[Strings]

MSFTUMDF =Sample

MediaDescription =Microsoft Sample Driver安装媒体

WudfRdDisplayName =Windows驱动程序基础 - 用户模式驱动程序框架反射器

VirtualSerialDeviceName =Microsoft VirtualSerial示例(UMDF 2)



我尝试过:



1)我复制了VirtualSerial2um.cer文件VirtualSerial2um.inf来自Windows-driver-samples-master \serial \ VirtualSerial2 \ ComPort \ x64 \ Debug& devcon.exe从C:\Program Files\Windows Kits \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ >
2)然后在目标机器上打开Internet Explorer我转到Internet选项 - > content->证书 - >导入然后我选择了VirtualSerial2um.cer文件&导入证书。



3)然后在目标机器上我以管理员身份打开命令提示符,浏览到Sample文件夹&输入以下命令。



devcon install virtualSerial2um.inf UMDF \ Virtual_1



然后在命令提示符下说:

设备树条目创建

devcon失败。




在设备管理器中,在未知设备下出现COMn(n是com端口号),但是当我打开超级终端时COMn没有显示在COM端口的下拉列表中。

AS my development machine & my test machine are 64bit windows system with Windows 7 operating System So to give myself a head start I compiled the ComPort project under Windows-driver-samples-master/serial/VirtualSerial2 sample code provided by Microsoft, initial it flashed an error that said as follows "Provider cannot be "Microsoft", must be an organization who authored INF" so I changed the following line in .inx file MSFTUMDF=Microsoft to MSFTUMDF=Sample, then it compiled successfully.

Then I follow the following process to install the driver on the target machine.

1) I copied the VirtualSerial2um.cer file VirtualSerial2um.inf from Windows-driver-samples-master\serial\VirtualSerial2\ComPort\x64\Debug & devcon.exe from C:\Program Files\Windows Kits\10\Tools\x64 to a Sample folder in the C:\ drive of the Target device.

2) Then on target machine I open the internet explorer I went to Internet Options->content->Certificates->import then I selected the VirtualSerial2um.cer file & imported the Certificate.

3) Then on target machine I opened the command prompt as Administrator, browsed to the Sample folder & typed the following command.

devcon install virtualSerial2um.inf UMDF\Virtual_1

Then on the command prompt it says:
device tree entry created
devcon failed.


In the device manager Under Unknown Device COMn(n is com port number) appears but when I open my hyper terminal COMn doesn't show on the drop down list of COM ports.

Now I am unable to figure out why my devcon installation is failing & as it says that my driver is registered in the device tree then why It is showing in the Unknown device & not in PORTS

This is the content of the VirtualSerial2um.inf file

;
; Copyright (C) Microsoft Corporation, All Rights Reserved.
;
; VirtualSerial.inf
;
;Installation Notes:
; Type "devcon install VirtualSerial2um.inf UMDF\VirtualSerial2um" to install

[Version]
Signature="$Windows NT$"
Class=Ports
ClassGuid={4D36E978-E325-11CE-BFC1-08002BE10318}
Provider=%MSFTUMDF%
CatalogFile=WUDF.cat
DriverVer=05/30/2016,19.7.52.160

[Manufacturer]
%MSFTUMDF%=Microsoft,NTx86

[Microsoft.NTx86]
%VirtualSerialDeviceName%=VirtualSerial_Install,UMDF\VirtualSerial2um

[SourceDisksFiles]
Virtualserial2um.dll=1

[SourceDisksNames]
1 = %MediaDescription%

; =================== UMDF VirtualSerial Device ==================================

[VirtualSerial_Install.NT]
CopyFiles=UMDriverCopy

[VirtualSerial_Install.NT.hw]
AddReg=SetDeviceType_AddReg

[VirtualSerial_Install.NT.Services]
AddService=WUDFRd,0x000001fa,WUDFRD_ServiceInstall

[VirtualSerial_Install.NT.Wdf]
UmdfService = VirtualSerial, VirtualSerial_Install
UmdfServiceOrder = VirtualSerial
UmdfKernelModeClientPolicy = AllowKernelModeClients
UmdfFileObjectPolicy = AllowNullAndUnknownFileObjects
UmdfFsContextUsePolicy = CannotUseFsContexts

[VirtualSerial_Install]
UmdfLibraryVersion=2.15.0
ServiceBinary=%12%\UMDF\Virtualserial2um.dll

[WUDFRD_ServiceInstall]
DisplayName = %WudfRdDisplayName%
ServiceType = 1
StartType = 3
ErrorControl = 1
ServiceBinary = %12%\WUDFRd.sys

[SetDeviceType_AddReg]
HKR,,DeviceType,0x10001,0x0000001b ; 0x1b = FILE_DEVICE_SERIAL_PORT

[DestinationDirs]
UMDriverCopy=12,UMDF ; copy to drivers\UMDF

[UMDriverCopy]
Virtualserial2um.dll

; =================== Generic ==================================

[Strings]
MSFTUMDF="Sample"
MediaDescription="Microsoft Sample Driver Installation Media"
WudfRdDisplayName="Windows Driver Foundation - User-mode Driver Framework Reflector"
VirtualSerialDeviceName="Microsoft VirtualSerial Sample (UMDF 2)"

What I have tried:

1) I copied the VirtualSerial2um.cer file VirtualSerial2um.inf from Windows-driver-samples-master\serial\VirtualSerial2\ComPort\x64\Debug & devcon.exe from C:\Program Files\Windows Kits\10\Tools\x64 to a Sample folder in the C:\ drive of the Target device.

2) Then on target machine I open the internet explorer I went to Internet Options->content->Certificates->import then I selected the VirtualSerial2um.cer file & imported the Certificate.

3) Then on target machine I opened the command prompt as Administrator, browsed to the Sample folder & typed the following command.

devcon install virtualSerial2um.inf UMDF\Virtual_1

Then on the command prompt it says:
device tree entry created
devcon failed.


In the device manager Under Unknown Device COMn(n is com port number) appears but when I open my hyper terminal COMn doesn't show on the drop down list of COM ports.

推荐答案

Windows NT
Windows NT




Class = Ports

ClassGuid = {4D36E978-E325 -11CE-BFC1-08002BE10318}

提供商=%MSFTUMDF%

CatalogFile = WUDF.cat

DriverVer = 05/30 / 2016,19.7 .52.160



[制造商]

%MSFTUMDF%=微软,NTx86



[Microsoft.NTx86]

%VirtualSerialDeviceName%= VirtualSerial_Install,UMDF \ VirtualSerial2um



[SourceDisksFiles]

Virtualserial2um.dll = 1



[SourceDisksNames]

1 =%MediaDescription%



; =================== UMDF虚拟串口设备============================ ======



[VirtualSerial_Install.NT]

CopyFiles = UMDriverCopy



[VirtualSerial_Install.NT.hw]

AddReg = SetDeviceType_AddReg



[VirtualSerial_Install.NT.Services]

AddService = WUDFRd,0x000001fa,WUDFRD_ServiceInstall



[VirtualSerial_Install.NT.Wdf]

UmdfService = VirtualSerial,VirtualSerial_Install

UmdfServiceOrder = VirtualSerial

UmdfKernelModeClientPolicy = AllowKernelModeClients

UmdfFileObjectPolicy = AllowNullAndUnknownFileObjects

UmdfFsContextUsePolicy = CannotUseFsContexts



[VirtualSerial_Install]

UmdfLibraryVersion = 2.15.0

ServiceBinary =%12%\UMDF \ Virtualserial2um.dll



[WUDFRD_ServiceInstall]

DisplayName =%WudfRdDisplayName%

ServiceType = 1

StartType = 3

ErrorControl = 1

ServiceBinary =%12%\ WUDFRd.sys



[ SetDeviceType_AddReg]

HKR ,, DeviceType,0x10001,0x0000001b; 0x1b = FILE_DEVICE_SERIAL_PORT



[DestinationDirs]

UMDriverCopy = 12,UMDF;复制到drivers\UMDF



[UMDriverCopy]

Virtualserial2um.dll



; =================== Generic ============================== ====



[Strings]

MSFTUMDF =Sample

MediaDescription =Microsoft Sample Driver安装媒体

WudfRdDisplayName =Windows驱动程序基础 - 用户模式驱动程序框架反射器

VirtualSerialDeviceName =Microsoft VirtualSerial示例(UMDF 2)



我尝试过:



1)我复制了VirtualSerial2um.cer文件VirtualSerial2um.inf来自Windows-driver-samples-master \serial \ VirtualSerial2 \ ComPort \ x64 \ Debug& devcon.exe从C:\Program Files\Windows Kits \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ >
2)然后在目标机器上打开Internet Explorer我转到Internet选项 - > content->证书 - >导入然后我选择了VirtualSerial2um.cer文件&导入证书。



3)然后在目标机器上我以管理员身份打开命令提示符,浏览到Sample文件夹&输入以下命令。



devcon install virtualSerial2um.inf UMDF \ Virtual_1



然后在命令提示符下说:

设备树条目创建

devcon失败。




在设备管理器中,在未知设备下出现COMn(n是com端口号),但是当我打开超级终端时COMn没有显示在COM端口的下拉列表中。
"
Class=Ports
ClassGuid={4D36E978-E325-11CE-BFC1-08002BE10318}
Provider=%MSFTUMDF%
CatalogFile=WUDF.cat
DriverVer=05/30/2016,19.7.52.160

[Manufacturer]
%MSFTUMDF%=Microsoft,NTx86

[Microsoft.NTx86]
%VirtualSerialDeviceName%=VirtualSerial_Install,UMDF\VirtualSerial2um

[SourceDisksFiles]
Virtualserial2um.dll=1

[SourceDisksNames]
1 = %MediaDescription%

; =================== UMDF VirtualSerial Device ==================================

[VirtualSerial_Install.NT]
CopyFiles=UMDriverCopy

[VirtualSerial_Install.NT.hw]
AddReg=SetDeviceType_AddReg

[VirtualSerial_Install.NT.Services]
AddService=WUDFRd,0x000001fa,WUDFRD_ServiceInstall

[VirtualSerial_Install.NT.Wdf]
UmdfService = VirtualSerial, VirtualSerial_Install
UmdfServiceOrder = VirtualSerial
UmdfKernelModeClientPolicy = AllowKernelModeClients
UmdfFileObjectPolicy = AllowNullAndUnknownFileObjects
UmdfFsContextUsePolicy = CannotUseFsContexts

[VirtualSerial_Install]
UmdfLibraryVersion=2.15.0
ServiceBinary=%12%\UMDF\Virtualserial2um.dll

[WUDFRD_ServiceInstall]
DisplayName = %WudfRdDisplayName%
ServiceType = 1
StartType = 3
ErrorControl = 1
ServiceBinary = %12%\WUDFRd.sys

[SetDeviceType_AddReg]
HKR,,DeviceType,0x10001,0x0000001b ; 0x1b = FILE_DEVICE_SERIAL_PORT

[DestinationDirs]
UMDriverCopy=12,UMDF ; copy to drivers\UMDF

[UMDriverCopy]
Virtualserial2um.dll

; =================== Generic ==================================

[Strings]
MSFTUMDF="Sample"
MediaDescription="Microsoft Sample Driver Installation Media"
WudfRdDisplayName="Windows Driver Foundation - User-mode Driver Framework Reflector"
VirtualSerialDeviceName="Microsoft VirtualSerial Sample (UMDF 2)"

What I have tried:

1) I copied the VirtualSerial2um.cer file VirtualSerial2um.inf from Windows-driver-samples-master\serial\VirtualSerial2\ComPort\x64\Debug & devcon.exe from C:\Program Files\Windows Kits\10\Tools\x64 to a Sample folder in the C:\ drive of the Target device.

2) Then on target machine I open the internet explorer I went to Internet Options->content->Certificates->import then I selected the VirtualSerial2um.cer file & imported the Certificate.

3) Then on target machine I opened the command prompt as Administrator, browsed to the Sample folder & typed the following command.

devcon install virtualSerial2um.inf UMDF\Virtual_1

Then on the command prompt it says:
device tree entry created
devcon failed.


In the device manager Under Unknown Device COMn(n is com port number) appears but when I open my hyper terminal COMn doesn't show on the drop down list of COM ports.


以下是我的工作方式。



0. cd到build文件夹
Here is how I got mine to work.

0. cd to the build folder
C:\Temp\VirtualSerial\ComPort\x64\Release\virtualserial>





1.首先使用devcon命令安装驱动程序,它将失败。

Devcon命令是



1. First install the driver using the devcon command, it will fail.
Devcon command is

devcon install virtualserial.inf UMDF\VirtualSerial





2检查设备管理器,你会看到它显示为未知设备,或者带有感叹号的COM#。





3.对点击它 - >更新驱动程序 - >浏览我的电脑以获取驱动软件 - >让我从计算机上的可用驱动程序列表中选择





4.现在在我的机器上显示



2. Check device manager, you will see it show up as Unknown Device, or COM# with an exclamation mark.


3. Right click on it -> Update Driver -> browse my computer for driver software -> let me pick from a list of available drivers on my computer


4. Now on my machine it shows

Microsoft VirtualSerial User-Mode Device Sample

并在其下方显示

This driver is digitally signed





5.现在,如果您单击Have Disk,并浏览到示例中的任何virtualserial.inf文件,它将更改为

.

5. Now, if you click on Have Disk, and browse to any of the virtualserial.inf files in the sample, it changes to

This driver is not digitally signed



你不想要这个,所以如果你这样做,取消并回到第3步



6.点击下一步,您应该在设备管理器的端口下看到


You don't want this, so if you did this, cancel and go back to step 3

6. click Next, and you should see the

Microsoft VirtualSerial User-Mode Device Sample (COM#)







注意,你可以多次安装这个驱动程序,每次它会给你一个不同的端口号



一些额外的步骤调试任何人阅读。



1.如果您使用的是x64系统,请确保构建x64。我让Debug和Release都工作了



2.确保从Release或Debug文件夹中的virtualserial文件夹运行devcon。因为这个文件夹包含WudfUpdate_01011.dll文件



3.如果你不能让它显示这个驱动程序在任何时候都是数字签名,从这里抓住他的Digicert实用程序: https://www.digicert.com/util/DigiCertUtil.exe 您可能会看到Internet Explorer的安装方法旁边有一个感叹号。右键单击它,digicert将描述问题并提供修复它。或者,您也可以使用digiert从相应的Release文件夹导入virtualserial.cer文件。



4.最后,检查devcon日志,它们位于:

under Ports in Device Manager.


Notice, you can install this driver multiple times, and each time it will give you a different port number

Some additional steps to debugging for anyone reading.

1. Make sure you are building x64 if you are using an x64 system. I got both Debug and Release to work

2. Make sure you are running devcon from the virtualserial folder inside the Release or Debug folder. Because this folder contains the WudfUpdate_01011.dll file

3. If you cannot get it to show this driver is Digitally Signed at any point, grabt he Digicert utility from here: https://www.digicert.com/util/DigiCertUtil.exe you may see that the internet explorer installation method has an exclamation mark next to it. Right click on it, and digicert will describe the problem and offer to fix it. Alternatively you can also use digiert to import the virtualserial.cer file from the respective Release folder.

4. Finally, check the devcon logs, they are located in:

C:\Windows\INF\setupapi.dev.log





您正在寻找WHQL签名。



5。最后,尝试构建和安装项目而不首先对其进行任何修改,我们当然是在谈论这个项目 Windows-driver-samples / serial / VirtualSerial at master·Microsoft / Windows-driver-samples·GitHub [ ^ ]



感谢您提供的信息提供。你应该把它变成你问题的教学页面。



You are looking for a WHQL signature.

5. Lastly, try building and installing the project without making any modifications to it first, we are of course talking about this project Windows-driver-samples/serial/VirtualSerial at master · Microsoft/Windows-driver-samples · GitHub[^]

Thanks for the information you've provided. You should turn this into an instructional page from your question.


这篇关于无法在目标Windows 7 PC上安装virtualserial2示例UMDF驱动程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆