title: How can I read a file from a remote computer?
body: <p>I have a VBScript where I am parsing out information from windowsupdate.log. I had it working locally just fine and when connecting to a server on the same domain as me.</p>
  
  <p>I changed the way I am connecting to servers, I am doing</p>
  
  <pre><code>Set locator = CreateObject("WbemScripting.SWbemLocator")
  Set objWmiService = locator.ConnectServer(strComputer,"root\cimv2",strUsername,strPassword)
  objWmiService.Security_.ImpersonationLevel = 3
  </code></pre>
  
  <p>Now, the code that was working is </p>
  
  <pre><code>strFilePath = "\\" &amp; strComputer &amp; "\c$\Windows\windowsupdate.log"
  set objFile = objFSO.OpenTextFile(strFilePath)
  Do Until objFile.AtEndOfStream
     strLine = objFile.ReadLine()
     'Logic to parse line
      ...
  loop
  </code></pre>
  
  <p>But as I said, it only works for localhost or a server on the same domain.</p>
  
  <p>Is there a different way I can get a file, either I'm not searching correctly or it doesn't exist but I can't find a different way.</p>