title: Access is denied error for WMI for a network PC
body: <p>Below is a WMI script which gives local path of network share.It gives error</p>
  
  <pre><code>Script: D:\Desktop\nvt.vbs
  Line:   11
  Char:   1
  Error:  Access is denied. 
  Code:   80070005
  Source:     SWbemLocator
  </code></pre>
  
  <p>Here is code</p>
  
  <pre><code>strPath = "\\pc132\d"
  
  strPath = Replace(strPath, "\\", "")
  
  arrPath = Split(strPath, "\")
  
  strComputer = arrPath(0)
  strShare = arrPath(1)
  
  Set objSWbemLocator = CreateObject("WbemScripting.SWbemLocator") 
  Set objWMIService = objSWbemLocator.ConnectServer("PC132", "\\pc132\root\cimv2", "username", "password")
  
  
  Set colItems = objWMIService.ExecQuery _
      ("Select * From Win32_Share Where Name = '" &amp; strShare &amp; "'")
  
  For Each objItem in colItems
      Wscript.Echo objItem.Path
  Next
  </code></pre>
  
  <p>I do use admin login of the pc.WMI,RPC,RPC locator etc service are running.
  I have given full permission in COM Security in dcomcnfg .Also i have given permission for root/cimv2 etc.But still getting the error.So please help me on this.
  I have already refered <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/aa394603(v=vs.85).aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/windows/desktop/aa394603(v=vs.85).aspx</a>  and some other links</p>