2017-05-29 632 views
1

我是新來的驅動程序開發人員,爲了方便起見,我想先簡單地設置一下我可以編譯我的驅動程序,然後在Visual Studio 2015上打F5以在我的VMware機器上進行調試。我試圖做到這一點,而且我遇到了Google根本沒有幫助我的問題。Visual Studio驅動程序部署失敗

我的基本設置是一臺Windows 10 x64 VMWare機器,其串行端口作爲目標,Windows 10 x64作爲主機。目標在主機上。

開始,這裏是完整的日誌我在Visual Studio WinDbg中獲得當我嘗試調試我的司機:

Microsoft (R) Windows Debugger Version 10.0.15063.400 AMD64 
Copyright (c) Microsoft Corporation. All rights reserved. 

DESKTOP-AF13U59\Lupe (npipe WinIDE_01D2D83A52532800) connected at Mon May 29 00:13:35 2017 

Microsoft (R) Windows Debugger Version 10.0.15063.400 AMD64 
Copyright (c) Microsoft Corporation. All rights reserved. 

Opened \\.\pipe\com_1 
Waiting to reconnect... 
[00:13:36:302]: Remove Existing Remote Package 
[00:13:37:137]: Task "Remove Existing Remote Package" completed successfully 
[00:13:37:143]: Copy Driver Package 
[00:13:40:517]: Task "Copy Driver Package" completed successfully 
[00:13:40:532]: Driver Removal 
[00:13:40:532]: Removing any existing files from test execution folder. 
[00:13:41:367]: Copying required files for "Driver Removal". 

$KitRoot$\Testing\Runtimes\TAEF\te.exe "%SystemDrive%\DriverTest\Run\DriverTestTasks.dll" /select:"@Name='DriverTestTasks::_DriverRemoval'" /p:"InfFile=auxkdb.inf" /p:"ImportDriver=1" /p:"RemoveDriver=1" /p:"CertificateFile=auxkdb.cer" /p:"PackageGuid=x64" /rebootStateFile:%SystemDrive%\DriverTest\Run\DriverTestReboot.xml /enableWttLogging /wttDeviceString:$LogFile:file="%SystemDrive%\DriverTest\Run\Driver_Removal_00014.wtl",writemode=append,encoding=unicode,nofscache=true,EnableLvl="WexStartTest|WexEndTest|WexXml|WexProperty|WexCreateContext|WexCloseContext|*" /runas:Elevated 




Error message: Unable to start process 
[00:13:50:909]: Driver Preparation 
[00:13:50:910]: Removing any existing files from test execution folder. 
[00:13:51:745]: Copying required files for "Driver Preparation". 

$KitRoot$\Testing\Runtimes\TAEF\te.exe "%SystemDrive%\DriverTest\Run\DriverTestTasks.dll" /select:"@Name='DriverTestTasks::_DriverPreparation'" /p:"InfFile=auxkdb.inf" /p:"ImportDriver=1" /p:"RemoveDriver=1" /p:"CertificateFile=auxkdb.cer" /p:"PackageGuid=x64" /rebootStateFile:%SystemDrive%\DriverTest\Run\DriverTestReboot.xml /enableWttLogging /wttDeviceString:$LogFile:file="%SystemDrive%\DriverTest\Run\Driver_Preparation_00014.wtl",writemode=append,encoding=unicode,nofscache=true,EnableLvl="WexStartTest|WexEndTest|WexXml|WexProperty|WexCreateContext|WexCloseContext|*" /runas:Elevated 




Error message: Unable to start process 
[00:14:01:351]: Default Driver Package Installation Task 
[00:14:01:351]: Removing any existing files from test execution folder. 
[00:14:02:185]: Copying required files for "Default Driver Package Installation Task". 

$KitRoot$\Testing\Runtimes\TAEF\te.exe "%SystemDrive%\DriverTest\Run\DefaultDriverPackageInstallationTask.dll" /select:"@Name='Microsoft.DriverKit.DefaultDriverPackageInstallationClass.PerformDefaultDriverPackageInstallation'" /p:"AbsoluteDriverPackagePath=%SystemDrive%\DriverTest\Drivers\auxkdb.inf" /p:"DQ=%SystemDrive%\DriverTest\Drivers\auxkdb.inf" /rebootStateFile:%SystemDrive%\DriverTest\Run\DriverTestReboot.xml /enableWttLogging /wttDeviceString:$LogFile:file="%SystemDrive%\DriverTest\Run\Default_Driver_Package_Installation_Task_00012.wtl",writemode=append,encoding=unicode,nofscache=true,EnableLvl="WexStartTest|WexEndTest|WexXml|WexProperty|WexCreateContext|WexCloseContext|*" /runas:Elevated 




Error message: Unable to start process 
[00:14:11:710]: Driver Post Install Actions 
[00:14:11:711]: Removing any existing files from test execution folder. 
[00:14:12:545]: Copying required files for "Driver Post Install Actions". 

$KitRoot$\Testing\Runtimes\TAEF\te.exe "%SystemDrive%\DriverTest\Run\DriverTestTasks.dll" /select:"@Name='DriverTestTasks::_DriverPostInstall'" /rebootStateFile:%SystemDrive%\DriverTest\Run\DriverTestReboot.xml /enableWttLogging /wttDeviceString:$LogFile:file="%SystemDrive%\DriverTest\Run\Driver_Post_Install_Actions_00014.wtl",writemode=append,encoding=unicode,nofscache=true,EnableLvl="WexStartTest|WexEndTest|WexXml|WexProperty|WexCreateContext|WexCloseContext|*" /runas:Elevated 




Error message: Unable to start process 

似乎就得到儘可能把驅動程序文件在C:\DriverTest\DriversNew,但它從不啓動驅動程序。

其他基本信息:

  • 防火牆是關閉兩個主機上和目標
  • 我可以在主機
  • 按名稱ping VM我可以使用WinDbg同一端口
  • 調試VM
  • Visual Studio中的機器說「配置爲驅動程序測試」,所以它似乎認爲一切正常,至少

我我不知道還有什麼可以提供,但the only other occurrence of the problem I could find是自我回答,並表示通過重新安裝Visual Studio,Windows SDK和WDK解決了問題。我做了所有這些事情,並且也嘗試了Windows 7 x64的目標,但問題仍然存在。它也創建了WDKRemoteUser並登錄,之後沒有任何(看似)。

我使用了VS,SDK和WDK的this page的所有鏈接,所以我不認爲它是某種版本的不匹配,我已經從目標主機上安裝了C:\Program Files (x86)\Windows Kits\10\Remote\x64\WDK Test Target Setup x64-x64_en-us.msi

任何想法?

回答

0

我剛剛發現它來自:p 當VS開始調試時,我也得到了3或4 cmd,但顯示速度非常快,所以我無法讀取它說的內容。 我設法截圖:http://imgur.com/a/Lw5Pe。 (圖片Seconde系列)

「它說Te.service需要啓動一個宿主進程請重新啓動它,如果它已經安裝。」 =>谷歌「Te.Service重啓」 =>https://docs.microsoft.com/en-us/windows-hardware/drivers/taef/te-service

所以:

  1. 我到C:\ Program Files文件(x86)的\的Windows套件\ 10 \測試\運行時\塔伊夫
  2. 開闢了新的CMD爲管理
  3. 運行:「Wex.Services.exe /安裝:Te.Service「 我得到了」WA RNING:Te.Service安裝正在刪除先前的Te.Service安裝,因爲關聯的二進制文件已被刪除,或者無法在「C:\ Program Files(x86)\ Windows Kits \ 10 \ Testing \ Runtimes \ TAEF \ Wex.Services 。可執行程序」。 安裝Te.Service [成功]「YEAAH:p
  4. 而我跑了」sc start te。服務」

後,我沒有再獲得同樣的錯誤。

但我得到了另一個錯誤‘無法因爲用戶不是管理員’http://imgur.com/a/Lw5Pe(第1圖像)

提升用戶的令牌

VS逼我切換到它之前創建的另一個用戶,所以沒有足夠的管理權 所以我把它添加到管理員本地組:法國 「淨本地管理員WDKRemoteUser /加」 : 「 net localgroup administrateurs WDKRemoteUser/add「

你是否是內核驅動程序開發新手?也許我們可以在未來關於這個問題互相幫助:)

我希望它會幫助你的人!

相關問題