title: Visual Basic Search Script
body: <p>I obtained this script from another site, and attempted to modify it to search more than two drives, specifically I wanted it to search almost every drive possible, but as soon as i add a third drive letter the script does not work.</p>
  
  <pre><code> strComputer = "."
  
  Set objWMIService = GetObject("winmgmts:\\" &amp; strComputer &amp; "\root\cimv2")
  
  Set colFiles = objWMIService.ExecQuery _
      ("Select * from CIM_DataFile Where Extension = 'mdb' AND (Drive = 'B:' OR Drive = 'C:' OR Drive = 'D:')")
  
  ' If colFiles.Count = 0 Then
  '     Wscript.Quit
  ' End If
  
  Set objTextFile = wshfso.CreateTextFile("c:\temp\" &amp; vComputer &amp; ".txt " , True)
  
  For Each objFile in colFiles
      objTextFile.Write(objFile.Drive &amp; objFile.Path &amp; "")
      objTextFile.Write(objFile.FileName &amp; "." &amp; objFile.Extension &amp; ", Size ")
      objTextFile.Write(objFile.FileSize /1024 &amp; "kb" &amp; vbCrLf)
  Next
  </code></pre>