2012-03-26 76 views
-1
 Dim wmins = ("//192.168.1.5/root/cimv2") 
     objOS = New ManagementObjectSearcher(wmins, "SELECT * FROM Win32_OperatingSystem ") 
     objCS = New ManagementObjectSearcher(wmins, "SELECT * FROM Win32_ComputerSystem") 
     objPR = New ManagementObjectSearcher(wmins, "SELECT * FROM Win32_Processor") 
     objHS = New ManagementObjectSearcher(wmins, "SELECT * FROM Win32_DiskDrive") 
     objIS = New ManagementObjectSearcher(wmins, "SELECT * FROM Win32_Product") 
     For Each objMgmt In objOS.Get 
        The error is: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)) 


      m_strOSName = objMgmt("name").ToString() 
      m_strOSVersion = objMgmt("version").ToString() 
      m_strComputerName = objMgmt("csname").ToString() 
      m_strWindowsDir = objMgmt("windowsdirectory").ToString() 
     Next 

我只是想列出我的局域網系統中的所有已安裝的軟件的這一切在本地網絡系統上安裝軟件時出錯!訪問被拒絕。 (異常來自HRESULT:0X80070005(E_ACCESSDENIED))

+0

這是什麼系統? – Aristos 2012-03-26 13:18:06

回答

0

我想你沒有權限來訪問您要訪問的路徑。請檢查您的機器的訪問權限。

+0

在哪裏以及如何檢查。請告訴我在本地區域系統 – venkat28081988 2012-03-27 04:27:17

+0

步驟檢查文件夾權利右鍵單擊文件夾和安全選項卡上,您必須完全控制IIS用戶 – 2012-03-27 05:45:13

相關問題