今天同事使用一個用VB.NET2008開發的應用程序時提示“出現了下列應用程序錯誤:無法啟動服務,原因可能是已被禁用或與其相關聯的設備沒有啟動。(異常來自HRESULT:0x80070422)”
互聯網似乎比較少關於HRESULT:0x80070422錯誤的內容,最后只找出兩個答案:
1.“Windows Update”服務需開啟,如果無法開啟需使用下面的批處理。
sc config wuauserv start= auto
sc config bits start= auto
sc config DcomLaunch start= auto
net stop wuauserv
net start wuauserv
net stop bits
net start bits
net start DcomLaunch
2.“Windows Management Instrumentation”服務需開啟。
感覺第 1 個方法不怎么靠譜或者說更復雜一些,所以我干脆就先使用第 2 個方法,結果是錯誤消失。