许久没有写文章了,今天写一篇吧,顺便记录一下get新技能。
昨天要使用Mobile Device Power Monitor来测试个东西,结果连到电脑上,安装了软件。在安装驱动的时候,出现找不到指定文件:
![](https://images0.cnblogs.com/blog2015/104375/201508/281325380154257.png)
各种折腾了半天,还是没搞定。在同事的电脑上可以识别,于是去同事那拷了usbser.sys到c:\windows\system32\drivers依然还是不行(我电脑上怎么没有这个文件?被卸载的时候删了?)为了找这个(系统找不到指定的文件),到底是哪个文件不行啊!
今天又去控制面板-》管理工具-》事件查看器-》系统日志里翻了一下,只有这个:
![](https://images0.cnblogs.com/blog2015/104375/201508/281325235786545.jpg)
但是还是不知道0x2到底是啥意思啊!mchpcdc.inf也看了,没啥问题,里面就是要一个usbser.sys,再就是mchpcdc.cat。
又去c:\windows\inf下翻,把文件按日期重新排序了一下,把最新的.inf,.pnf都干掉。重新安装驱动还是不行。这时注意到了两个文件
setupapi.dev.log和setupapi.app.log,打开setupapi.dev.log,研究了一下,发现了!
原来是要把usbser.sys放到C:\windows\System32\DriverStore\FileRepository\mdmcpq.inf_amd64_neutral_fbc4a14a6a13d0c8才可以!
我的电脑居然没有 C:\windows\System32\DriverStore\FileRepository\mdmcpq.inf_amd64_neutral_fbc4a14a6a13d0c8这个目录,在文件夹FileRepository右键取得管理员权限,mdmcpq.inf_amd64_neutral_fbc4a14a6a13d0c8,再取得这个目录的管理员权限,放入usbser.sys,重新装一下驱动,搞定!
折腾了半天终于好了啊!!!!!
昨天要使用Mobile Device Power Monitor来测试个东西,结果连到电脑上,安装了软件。在安装驱动的时候,出现找不到指定文件:
![](https://images0.cnblogs.com/blog2015/104375/201508/281325380154257.png)
各种折腾了半天,还是没搞定。在同事的电脑上可以识别,于是去同事那拷了usbser.sys到c:\windows\system32\drivers依然还是不行(我电脑上怎么没有这个文件?被卸载的时候删了?)为了找这个(系统找不到指定的文件),到底是哪个文件不行啊!
今天又去控制面板-》管理工具-》事件查看器-》系统日志里翻了一下,只有这个:
![](https://images0.cnblogs.com/blog2015/104375/201508/281325235786545.jpg)
但是还是不知道0x2到底是啥意思啊!mchpcdc.inf也看了,没啥问题,里面就是要一个usbser.sys,再就是mchpcdc.cat。
又去c:\windows\inf下翻,把文件按日期重新排序了一下,把最新的.inf,.pnf都干掉。重新安装驱动还是不行。这时注意到了两个文件
setupapi.dev.log和setupapi.app.log,打开setupapi.dev.log,研究了一下,发现了!
>>> [Device Install (DiShowUpdateDevice) - USB\VID_04D8&PID_FE23\5&2ADC6C57&0&4]
>>> Section start 2015/08/28 10:03:33.826
cmd: "C:\windows\system32\mmc.exe" "C:\windows\system32\devmgmt.msc"
dvi: {DIF_UPDATEDRIVER_UI} 10:03:33.826
dvi: No class installer for 'Mobile Device Power Monitor'
dvi: No CoInstallers found
dvi: Default installer: Enter 10:03:33.827
dvi: Default installer: Exit
dvi: {DIF_UPDATEDRIVER_UI - exit(0xe000020e)} 10:03:33.827
ndv: {Update Driver Software Wizard for USB\VID_04D8&PID_FE23\5&2ADC6C57&0&4}
dvi: Set selected driver complete.
dvi: {DIF_SELECTDEVICE} 10:03:40.860
dvi: Using exported function 'PortsClassInstaller' in module 'C:\windows\system32\MsPorts.Dll'.
dvi: Class installer == MsPorts.Dll,PortsClassInstaller
dvi: No CoInstallers found
dvi: Class installer: Enter 10:03:40.862
dvi: Class installer: Exit
dvi: {DIF_SELECTDEVICE - exit(0xe000020e)} 10:03:40.863
inf: {SetupCopyOEMInf: C:\windows\INF\oem16.inf} 10:03:59.517
inf: Driver Store location: C:\windows\System32\DriverStore\FileRepository\mchpcdc.inf_amd64_neutral_2ade53c15173575e\mchpcdc.inf
inf: Published Inf Path: C:\windows\INF\oem16.inf
inf: Opened PNF: 'C:\windows\INF\oem16.inf' ([strings])
inf: Installing catalog mchpcdc.cat as: oem16.CAT
! inf: Failed to install catalog - error ignored
! inf: Error 2: The system cannot find the file specified. 这个错误估计可以忽略
inf: OEM source media location: C:\windows\INF\
inf: {SetupCopyOEMInf exit (0x00000000)} 10:03:59.523
dvi: Searching for hardware ID(s):
dvi: usb\vid_04d8&pid_fe23&rev_0000
dvi: usb\vid_04d8&pid_fe23
dvi: Searching for compatible ID(s):
dvi: usb\class_02&subclass_02&prot_01
dvi: usb\class_02&subclass_02
dvi: usb\class_02
inf: Opened PNF: 'C:\windows\System32\DriverStore\FileRepository\mchpcdc.inf_amd64_neutral_2ade53c15173575e\mchpcdc.inf' ([strings])
sig: {_VERIFY_FILE_SIGNATURE} 10:03:59.526
sig: Key = mchpcdc.inf
sig: FilePath = C:\windows\System32\DriverStore\FileRepository\mchpcdc.inf_amd64_neutral_2ade53c15173575e\mchpcdc.inf
sig: Catalog = C:\windows\System32\DriverStore\FileRepository\mchpcdc.inf_amd64_neutral_2ade53c15173575e\mchpcdc.cat
! sig: Verifying file against specific (valid) catalog failed! (0x800b0109)
! sig: Error 0x800b0109: A certificate chain processed, but terminated in a root certificate which is not trusted by the trust provider. 这个错误估计可以忽略
sig: {_VERIFY_FILE_SIGNATURE exit(0x800b0109)} 10:03:59.532
sig: {_VERIFY_FILE_SIGNATURE} 10:03:59.532
sig: Key = mchpcdc.inf
sig: FilePath = C:\windows\System32\DriverStore\FileRepository\mchpcdc.inf_amd64_neutral_2ade53c15173575e\mchpcdc.inf
sig: Catalog = C:\windows\System32\DriverStore\FileRepository\mchpcdc.inf_amd64_neutral_2ade53c15173575e\mchpcdc.cat
sig: Success: File is signed in Authenticode(tm) catalog.
sig: Error 0xe0000241: The INF was signed with an Authenticode(tm) catalog from a trusted publisher. 这个错误估计可以忽略
sig: {_VERIFY_FILE_SIGNATURE exit(0xe0000241)} 10:03:59.550
dvi: Selected driver installs from section [DriverInstall] in 'c:\windows\system32\driverstore\filerepository\mchpcdc.inf_amd64_neutral_2ade53c15173575e\mchpcdc.inf'.
dvi: Class GUID of device changed to: {4d36e978-e325-11ce-bfc1-08002be10318}.
dvi: {DIF_DESTROYPRIVATEDATA} 10:03:59.551
dvi: Class installer: Enter 10:03:59.551
dvi: Class installer: Exit
dvi: Default installer: Enter 10:03:59.552
dvi: Default installer: Exit
dvi: {DIF_DESTROYPRIVATEDATA - exit(0xe000020e)} 10:03:59.553
dvi: Set selected driver complete.
dvi: {Plug and Play Service: Device Install for USB\VID_04D8&PID_FE23\5&2ADC6C57&0&4}
ump: Creating Install Process: DrvInst.exe 10:03:59.569
ndv: Infpath=C:\windows\INF\oem16.inf
ndv: DriverNodeName=mchpcdc.inf:DeviceList.NTamd64:DriverInstall:16.20.34.438:usb\vid_04d8&pid_fe23
ndv: DriverStorepath=C:\windows\System32\DriverStore\FileRepository\mchpcdc.inf_amd64_neutral_2ade53c15173575e\mchpcdc.inf
ndv: Building driver list from driver node strong name...
dvi: Searching for hardware ID(s):
dvi: usb\vid_04d8&pid_fe23&rev_0000
dvi: usb\vid_04d8&pid_fe23
dvi: Searching for compatible ID(s):
dvi: usb\class_02&subclass_02&prot_01
dvi: usb\class_02&subclass_02
dvi: usb\class_02
inf: Opened PNF: 'C:\windows\System32\DriverStore\FileRepository\mchpcdc.inf_amd64_neutral_2ade53c15173575e\mchpcdc.inf' ([strings])
sig: {_VERIFY_FILE_SIGNATURE} 10:03:59.591
sig: Key = mchpcdc.inf
sig: FilePath = C:\windows\System32\DriverStore\FileRepository\mchpcdc.inf_amd64_neutral_2ade53c15173575e\mchpcdc.inf
sig: Catalog = C:\windows\System32\DriverStore\FileRepository\mchpcdc.inf_amd64_neutral_2ade53c15173575e\mchpcdc.cat
! sig: Verifying file against specific (valid) catalog failed! (0x800b0109)
! sig: Error 0x800b0109: A certificate chain processed, but terminated in a root certificate which is not trusted by the trust provider. 这个错误估计可以忽略
sig: {_VERIFY_FILE_SIGNATURE exit(0x800b0109)} 10:03:59.622
sig: {_VERIFY_FILE_SIGNATURE} 10:03:59.622
sig: Key = mchpcdc.inf
sig: FilePath = C:\windows\System32\DriverStore\FileRepository\mchpcdc.inf_amd64_neutral_2ade53c15173575e\mchpcdc.inf
sig: Catalog = C:\windows\System32\DriverStore\FileRepository\mchpcdc.inf_amd64_neutral_2ade53c15173575e\mchpcdc.cat
sig: Success: File is signed in Authenticode(tm) catalog.
sig: Error 0xe0000241: The INF was signed with an Authenticode(tm) catalog from a trusted publisher.这个错误估计可以忽略
sig: {_VERIFY_FILE_SIGNATURE exit(0xe0000241)} 10:03:59.644
dvi: Selected driver installs from section [DriverInstall] in 'c:\windows\system32\driverstore\filerepository\mchpcdc.inf_amd64_neutral_2ade53c15173575e\mchpcdc.inf'.
dvi: Class GUID of device changed to: {4d36e978-e325-11ce-bfc1-08002be10318}.
dvi: Set selected driver complete.
ndv: {Core Device Install} 10:03:59.647
inf: Opened PNF: 'C:\windows\INF\oem16.inf' ([strings])
dvi: {DIF_ALLOW_INSTALL} 10:03:59.653
dvi: Using exported function 'PortsClassInstaller' in module 'C:\windows\system32\MsPorts.Dll'.
dvi: Class installer == MsPorts.Dll,PortsClassInstaller
dvi: No CoInstallers found
dvi: Class installer: Enter 10:03:59.656
dvi: Class installer: Exit
dvi: Default installer: Enter 10:03:59.656
dvi: Default installer: Exit
dvi: {DIF_ALLOW_INSTALL - exit(0xe000020e)} 10:03:59.657
ndv: Installing files...
dvi: {DIF_INSTALLDEVICEFILES} 10:03:59.658
dvi: Class installer: Enter 10:03:59.658
dvi: Class installer: Exit
dvi: Default installer: Enter 10:03:59.659
dvi: {Install FILES}
inf: Opened PNF: 'c:\windows\system32\driverstore\filerepository\mchpcdc.inf_amd64_neutral_2ade53c15173575e\mchpcdc.inf' ([strings])
inf: Opened PNF: 'C:\windows\INF\mdmcpq.inf' ([strings])
inf: {Install Inf Section [DriverInstall.NTAMD64]}
inf: CopyFiles=DriverCopyFiles.NTamd64 (mchpcdc.inf line 55)
cpy: Open PnpLockdownPolicy: Err=2. This is OK. Use LockDownPolicyDefault
flq: QueueSingleCopy...
flq: Inf : 'c:\windows\system32\driverstore\filerepository\mchpcdc.inf_amd64_neutral_2ade53c15173575e\mchpcdc.inf'
flq: SourceInf: 'C:\windows\INF\mdmcpq.inf'
flq: SourceSection: [sourcedisksfiles]
flq: Source root path based on SourceInf
flq: SourceRootPath: 'C:\windows\System32\DriverStore\FileRepository\mdmcpq.inf_amd64_neutral_fbc4a14a6a13d0c8'
flq: {FILE_QUEUE_COPY}
flq: CopyStyle - 0x00002000
flq: {FILE_QUEUE_COPY}
flq: CopyStyle - 0x00002000
flq: SourceRootPath - 'C:\windows\System32\DriverStore\FileRepository\mdmcpq.inf_amd64_neutral_fbc4a14a6a13d0c8'
flq: SourceFilename - 'usbser.sys'
flq: TargetDirectory- 'C:\windows\system32\DRIVERS'
flq: TargetFilename - 'usbser.sys'
flq: SourceDesc - 'windows cd'
flq: {FILE_QUEUE_COPY exit(0x00000000)}
flq: {FILE_QUEUE_COPY exit(0x00000000)}
inf: {Install Inf Section [DriverInstall.NTAMD64] exit (0x00000000)}
dvi: Processing co-installer registration section [DriverInstall.NTAMD64.CoInstallers].
inf: {Install Inf Section [DriverInstall.NTAMD64.CoInstallers]}
inf: {Install Inf Section [DriverInstall.NTAMD64.CoInstallers] exit (0x00000000)}
dvi: Co-installers registered.
dvi: {Install INTERFACES}
dvi: Installing section [DriverInstall.NTAMD64.Interfaces]
dvi: {Install INTERFACES exit 00000000}
dvi: {Install FILES exit (0x00000000)}
dvi: Default installer: Exit
dvi: {DIF_INSTALLDEVICEFILES - exit(0x00000000)} 10:03:59.672
ndv: Pruning file queue...
dvi: {_SCAN_FILE_QUEUE}
flq: ScanQ flags=620
flq: SPQ_SCAN_PRUNE_COPY_QUEUE
flq: SPQ_SCAN_FILE_COMPARISON
flq: SPQ_SCAN_ACTIVATE_DRP
flq: ScanQ number of copy nodes=1
flq: ScanQ action=200 DoPruning=32
flq: ScanQ end Validity flags=620 CopyNodes=1
dvi: {_SCAN_FILE_QUEUE exit(0, 0x00000000)}
ndv: Committing file queue...
flq: {_commit_file_queue}
flq: CommitQ DelNodes=0 RenNodes=0 CopyNodes=1
flq: {SPFILENOTIFY_STARTQUEUE}
flq: {SPFILENOTIFY_STARTQUEUE - exit(0x00000001)}
flq: {_commit_copy_subqueue}
flq: subqueue count=1
flq: {SPFILENOTIFY_STARTSUBQUEUE}
flq: {SPFILENOTIFY_STARTSUBQUEUE - exit(0x00000001)}
flq: source media:
flq: Description - [windows cd]
flq: SourcePath -[C:\windows\System32\DriverStore\FileRepository\mdmcpq.inf_amd64_neutral_fbc4a14a6a13d0c8]
flq: SourceFile - [usbser.sys]
flq: Flags - 0x00000000
flq: {SPFQNOTIFY_NEEDMEDIA}
flq: {SPFILENOTIFY_NEEDMEDIA}
flq: {SPFILENOTIFY_NEEDMEDIA - exit(0x00000000)}
flq: {SPFQNOTIFY_NEEDMEDIA - returned 0x00000000}
!!! flq: source media: SPFQOPERATION_ABORT.
!!! flq: Error 2: The system cannot find the file specified. 问题来了!这个就是那个找不到的文件
flq: {_commit_copy_subqueue exit(0x00000002)}
!!! flq: FileQueueCommit aborting!
!!! flq: Error 2: The system cannot find the file specified.
flq: {SPFILENOTIFY_ENDQUEUE}
flq: {SPFILENOTIFY_ENDQUEUE - exit(0x00000001)}
flq: {_commit_file_queue exit(0x00000002)}
ndv: Device install status=0x00000002
ndv: Performing device install final cleanup...
! ndv: Queueing up error report since device installation failed...
ndv: {Core Device Install - exit(0x00000002)} 10:03:59.684
dvi: {DIF_DESTROYPRIVATEDATA} 10:03:59.684
dvi: Class installer: Enter 10:03:59.684
dvi: Class installer: Exit
dvi: Default installer: Enter 10:03:59.685
dvi: Default installer: Exit
dvi: {DIF_DESTROYPRIVATEDATA - exit(0xe000020e)} 10:03:59.685
ump: Server install process exited with code 0x00000002 10:03:59.691
ump: {Plug and Play Service: Device Install exit(00000002)}
ndv: Device Install failed for new device...installing NULL driver.
dvi: {Plug and Play Service: Device Install for USB\VID_04D8&PID_FE23\5&2ADC6C57&0&4}
ump: Creating Install Process: DrvInst.exe 10:03:59.713
! ndv: Installing NULL driver!
dvi: Set selected driver complete.
dvi: {DIF_ALLOW_INSTALL} 10:03:59.730
dvi: No class installer for 'Mobile Device Power Monitor'
dvi: No CoInstallers found
dvi: Default installer: Enter 10:03:59.731
dvi: Default installer: Exit
dvi: {DIF_ALLOW_INSTALL - exit(0xe000020e)} 10:03:59.731
dvi: {DIF_INSTALLDEVICE} 10:03:59.731
dvi: No class installer for 'Mobile Device Power Monitor'
dvi: Default installer: Enter 10:03:59.732
! dvi: Installing NULL driver!
dvi: Writing common driver property settings.
dvi: {Restarting Devices} 10:03:59.770
dvi: Restart: USB\VID_04D8&PID_FE23\5&2ADC6C57&0&4
dvi: Restart complete.
dvi: {Restarting Devices exit} 10:03:59.780
dvi: Default installer: Exit
dvi: {DIF_INSTALLDEVICE - exit(0x00000000)} 10:03:59.781
ump: Server install process exited with code 0x00000000 10:03:59.783
ump: {Plug and Play Service: Device Install exit(00000000)}
ndv: {Update Driver Software Wizard exit(00000002)}
<<< Section end 2015/08/28 10:07:12.485
<<< [Exit status: FAILURE(0x00000002)]
我的电脑居然没有 C:\windows\System32\DriverStore\FileRepository\mdmcpq.inf_amd64_neutral_fbc4a14a6a13d0c8这个目录,在文件夹FileRepository右键取得管理员权限,mdmcpq.inf_amd64_neutral_fbc4a14a6a13d0c8,再取得这个目录的管理员权限,放入usbser.sys,重新装一下驱动,搞定!
折腾了半天终于好了啊!!!!!