title: Getting remote machine's WINDOWS path
body: <p>I need to list files from a remote machine's WINDOWS directory. The programming language I am using is C# and the target OSs are Windows XP and Windows Server 2003. Right now what I am doing is:</p>
  
  <pre><code>filePaths = Directory.GetFiles("\\\\" + machineName + "\\c$\\WINDOWS");
  </code></pre>
  
  <p>Now, there might be instances where the WINDOWS directory is installed on a drive other than "C:\". This of course would pose problems with the above code.</p>
  
  <p>Anyone got a better solution?</p>
  
  <p>Also, another requirement is for me to read kb*log files (residing in the WINDOWS directory for OS &lt; Vista). Any recommendations as to how I should implement this? I am thinking of using a StreamReader unless there is a better alternative.</p>
  
  <p>TIA!</p>