I'm trying to use CIM_DataFile to search only the C drive for PST files. However, the code is running through all drives (plus network/mapped drives).
describes how to use the Drive property and it doesn't look like I'm doing anything wrong.
Anyone have any suggestions?
Code:
Set objWMIService = GetObject _
("winmgmts:\\" & strComputer & "\root\cimv2")
Set colFiles = objWMIService.ExecQuery _
("Select * From CIM_DataFile Where extension = 'PST' AND Drive='c:'")
For Each objFile in colFiles
' do stuff here..
Next
describes how to use the Drive property and it doesn't look like I'm doing anything wrong.
Anyone have any suggestions?