做了个驱动安装程序,驱动已经有签名了~直接手动安装能正常使用,调用SetupCopyOEMInf 安装,只复制了inf文件到c:\Windows\inf  并改名成oemXX.inf,没有oemXX.pnf ,Sys和cat文件也没有复制到系统的指定目录,但是SetupCopyOEMInf 是执行成功的请问win7应该怎么安装?Win7 64位的
谢谢
TCHAR Name[128] = {0};
DWORD Size = 10240;
if(!SetupCopyOEMInf(
_T("usb.inf"),
NULL,
SPOST_PATH,
SP_COPY_REPLACEONLY,
(TCHAR*)Name,
Size,
NULL,
NULL)) {
lastError = GetLastError();
strLog.Format(_T("安装usb.inf失败! ErrorCode = %d \r\n"),lastError);
ShowLog(strLog);
return FALSE;
}

解决方案 »

  1.   

    已经有签名了~刚刚去微软件认证的~这样写XP能安装上的呀~win7就只复制了个inf进去
      

  2.   

    32位的也不正常,怎么生成在这里啊?C:\Windows\System32\DriverStore\FileRepository\usb.inf_x86_neutral_2aa74141f774f157>>>  [SetupCopyOEMInf - \\VBOXSVR\xiaoxiao\x86\usb.inf]
    >>>  Section start 2012/06/18 09:37:42.812
          cmd: "\\VBOXSVR\xiaoxiao\DirverSetup.exe" 
         sto: {Import Driver Package: \\VBOXSVR\xiaoxiao\x86\usb.inf} 09:37:42.857
         sto:      Importing driver package into Driver Store:
         sto:           Driver Store   = C:\Windows\System32\DriverStore (Online | 6.1.7600)
         sto:           Driver Package = \\VBOXSVR\xiaoxiao\x86\usb.inf
         sto:           Architecture   = x86
         sto:           Locale Name    = neutral
         sto:           Flags          = 0x00000020
         sto:      Copying driver package files to 'C:\Users\lanxw\AppData\Local\Temp\{625c699b-8c92-59f5-6497-083928065e64}'.
         inf:      Opened INF: '\\VBOXSVR\xiaoxiao\x86\usb.inf' ([strings])
         inf:      Opened INF: '\\VBOXSVR\xiaoxiao\x86\usb.inf' ([strings])
         flq:      {FILE_QUEUE_COPY}
         flq:           CopyStyle      - 0x00000000
         flq:           SourceRootPath - '\\VBOXSVR\xiaoxiao\x86'
         flq:           SourceFilename - 'gnusbser.cat'
         flq:           TargetDirectory- 'C:\Users\lanxw\AppData\Local\Temp\{625c699b-8c92-59f5-6497-083928065e64}'
         flq:      {FILE_QUEUE_COPY exit(0x00000000)}
         flq:      {FILE_QUEUE_COPY}
         flq:           CopyStyle      - 0x00000000
         flq:           SourceRootPath - '\\VBOXSVR\xiaoxiao\x86'
         flq:           SourceFilename - 'gnusbser.sys'
         flq:           TargetDirectory- 'C:\Users\lanxw\AppData\Local\Temp\{625c699b-8c92-59f5-6497-083928065e64}'
      

  3.   

    flq:      {FILE_QUEUE_COPY exit(0x00000000)}
    flq:      {FILE_QUEUE_COPY}
    flq:           CopyStyle      - 0x00000000
    flq:           SourceRootPath - '\\VBOXSVR\xiaoxiao\x86'
    flq:           SourceFilename - 'usb.inf'
    flq:           TargetDirectory- 'C:\Users\lanxw\AppData\Local\Temp\{625c699b-8c92-59f5-6497-083928065e64}'
    flq:      {FILE_QUEUE_COPY exit(0x00000000)}
    flq:      {_commit_file_queue}
    flq:           CommitQ DelNodes=0 RenNodes=0 CopyNodes=3
    flq:           {_commit_copy_subqueue}
    flq:                subqueue count=3
    flq:                source media:
    flq:                     SourcePath   - [\\VBOXSVR\xiaoxiao\x86]
    flq:                     SourceFile   - [gnusbser.cat]
    flq:                     Flags        - 0x00000000
    flq:                {_commit_copyfile}
    flq:                     CopyFile: '\\VBOXSVR\xiaoxiao\x86\gnusbser.cat'
    flq:                           to: 'C:\Users\lanxw\AppData\Local\Temp\{625c699b-8c92-59f5-6497-083928065e64}\SET7C8A.tmp'
    flq:                     MoveFile: 'C:\Users\lanxw\AppData\Local\Temp\{625c699b-8c92-59f5-6497-083928065e64}\SET7C8A.tmp'
    flq:                           to: 'C:\Users\lanxw\AppData\Local\Temp\{625c699b-8c92-59f5-6497-083928065e64}\gnusbser.cat'
    flq:                {_commit_copyfile exit OK}
    flq:                {_commit_copyfile}
    flq:                     CopyFile: '\\VBOXSVR\xiaoxiao\x86\gnusbser.sys'
    flq:                           to: 'C:\Users\lanxw\AppData\Local\Temp\{625c699b-8c92-59f5-6497-083928065e64}\SET7C95.tmp'
    flq:                     MoveFile: 'C:\Users\lanxw\AppData\Local\Temp\{625c699b-8c92-59f5-6497-083928065e64}\SET7C95.tmp'
    flq:                           to: 'C:\Users\lanxw\AppData\Local\Temp\{625c699b-8c92-59f5-6497-083928065e64}\gnusbser.sys'
    flq:                {_commit_copyfile exit OK}
    flq:                {_commit_copyfile}
    flq:                     CopyFile: '\\VBOXSVR\xiaoxiao\x86\usb.inf'
    flq:                           to: 'C:\Users\lanxw\AppData\Local\Temp\{625c699b-8c92-59f5-6497-083928065e64}\SET7CA0.tmp'
    flq:                     MoveFile: 'C:\Users\lanxw\AppData\Local\Temp\{625c699b-8c92-59f5-6497-083928065e64}\SET7CA0.tmp'
    flq:                           to: 'C:\Users\lanxw\AppData\Local\Temp\{625c699b-8c92-59f5-6497-083928065e64}\usb.inf'
    flq:                {_commit_copyfile exit OK}
    flq:           {_commit_copy_subqueue exit OK}
    flq:      {_commit_file_queue exit OK}
    pol:      {Driver package policy check} 09:37:42.955
    pol:      {Driver package policy check - exit(0x00000000)} 09:37:42.955
    sto:      {Stage Driver Package: C:\Users\lanxw\AppData\Local\Temp\{625c699b-8c92-59f5-6497-083928065e64}\usb.inf} 09:37:42.955
    inf:           Opened INF: 'C:\Users\lanxw\AppData\Local\Temp\{625c699b-8c92-59f5-6497-083928065e64}\usb.inf' ([strings])
    inf:           Opened INF: 'C:\Users\lanxw\AppData\Local\Temp\{625c699b-8c92-59f5-6497-083928065e64}\usb.inf' ([strings])
    sto:           Copying driver package files:
    sto:                Source Path      = C:\Users\lanxw\AppData\Local\Temp\{625c699b-8c92-59f5-6497-083928065e64}
    sto:                Destination Path = C:\Windows\System32\DriverStore\Temp\{773e6fbe-bde4-7e58-351c-d96003c87f07}
    flq:           {FILE_QUEUE_COPY}
    flq:                CopyStyle      - 0x00000010
    flq:                SourceRootPath - 'C:\Users\lanxw\AppData\Local\Temp\{625c699b-8c92-59f5-6497-083928065e64}'
    flq:                SourceFilename - 'gnusbser.cat'
    flq:                TargetDirectory- 'C:\Windows\System32\DriverStore\Temp\{773e6fbe-bde4-7e58-351c-d96003c87f07}'
    flq:           {FILE_QUEUE_COPY exit(0x00000000)}
    flq:           {FILE_QUEUE_COPY}
    flq:                CopyStyle      - 0x00000010
    flq:                SourceRootPath - 'C:\Users\lanxw\AppData\Local\Temp\{625c699b-8c92-59f5-6497-083928065e64}'
    flq:                SourceFilename - 'gnusbser.sys'
    flq:                TargetDirectory- 'C:\Windows\System32\DriverStore\Temp\{773e6fbe-bde4-7e58-351c-d96003c87f07}'
    flq:           {FILE_QUEUE_COPY exit(0x00000000)}
    flq:           {FILE_QUEUE_COPY}
    flq:                CopyStyle      - 0x00000010
    flq:                SourceRootPath - 'C:\Users\lanxw\AppData\Local\Temp\{625c699b-8c92-59f5-6497-083928065e64}'
    flq:                SourceFilename - 'usb.inf'
    flq:                TargetDirectory- 'C:\Windows\System32\DriverStore\Temp\{773e6fbe-bde4-7e58-351c-d96003c87f07}'
    flq:           {FILE_QUEUE_COPY exit(0x00000000)}
    flq:           {_commit_file_queue}
    flq:                CommitQ DelNodes=0 RenNodes=0 CopyNodes=3
    flq:                {_commit_copy_subqueue}
    flq:                     subqueue count=3
    flq:                     source media:
    flq:                          SourcePath   - [C:\Users\lanxw\AppData\Local\Temp\{625c699b-8c92-59f5-6497-083928065e64}]
    flq:                          SourceFile   - [gnusbser.cat]flq:                          Flags        - 0x00000000
    flq:                     {_commit_copyfile}
    flq:                          CopyFile: 'C:\Users\lanxw\AppData\Local\Temp\{625c699b-8c92-59f5-6497-083928065e64}\gnusbser.cat'
    flq:                                to: 'C:\Windows\System32\DriverStore\Temp\{773e6fbe-bde4-7e58-351c-d96003c87f07}\SET7CD0.tmp'
    flq:                          MoveFile: 'C:\Windows\System32\DriverStore\Temp\{773e6fbe-bde4-7e58-351c-d96003c87f07}\SET7CD0.tmp'
    flq:                                to: 'C:\Windows\System32\DriverStore\Temp\{773e6fbe-bde4-7e58-351c-d96003c87f07}\gnusbser.cat'
    flq:                     {_commit_copyfile exit OK}
    flq:                     {_commit_copyfile}
    flq:                          CopyFile: 'C:\Users\lanxw\AppData\Local\Temp\{625c699b-8c92-59f5-6497-083928065e64}\gnusbser.sys'
    flq:                                to: 'C:\Windows\System32\DriverStore\Temp\{773e6fbe-bde4-7e58-351c-d96003c87f07}\SET7CDB.tmp'
    flq:                          MoveFile: 'C:\Windows\System32\DriverStore\Temp\{773e6fbe-bde4-7e58-351c-d96003c87f07}\SET7CDB.tmp'