win7安装驱动出现找不到文件

win7找不到文件

许久没有写文章了,今天写一篇吧,顺便记录一下get新技能。 昨天要使用Mobile Device Power Monitor来测试个东西,结果连到电脑上,安装了软件。在安装驱动的时候,出现找不到指定文件:

各种折腾了半天,还是没搞定。在同事的电脑上可以识别,于是去同事那拷了usbser.sys到c:\windows\system32\drivers依然还是不行(我电脑上怎么没有这个文件?被卸载的时候删了?)为了找这个(系统找不到指定的文件),到底是哪个文件不行啊!今天又去控制面板-》管理工具-》事件查看器-》系统日志里翻了一下,只有这个:

文章图片

但是还是不知道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:      {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

     inf:           Opened PNF: ‘C:\windows\System32\DriverStore\FileRepository\mchpcdc.inf_amd64_neutral_2ade53c15173575e\mchpcdc.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:

     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)]

原来是要把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,重新装一下驱动,搞定! 折腾了半天终于好了啊!!!!!