I am new to WMI...Upon reviewing the MSDN documentation I built the
following query...I want to retrieve the "file type" for file(s)...I already
have the path(s)...
* Code:
---------
dim query as string = "select * from CIM_LogicalFile where Name=C:\Documents
and Settings\apple\My Documents\~dev\vb.net\DocParser.zip"
dim lo_WMIObjSearcher = New ManagementObjectSearcher(query)
dim lo_WMIObjCol as ManagementObjectCollection
dim lo_WMIObj as ManagementObject
for each lo_WMIObj in lo_WMIObjCol
' Some other code...
next
* Outcome:
-----------------------------------------------------------
Exception: Invalid Query
This exception gets thrown upon initialization of the loop...Or when I try
to access any of the properties of lo_WMIObjCol
Any insight would be greatly appreciated!!
Shannon Richards
BBA, AIT, MCP