Home » Category » DLL & COM & ActiveX

DLL & COM & ActiveX: WMI / Win32_FileSpecification

104| Fri, 30 Nov 2007 16:44:00 GMT| babbalouie| Comments (0)
This doesn't work:


Set EachType = GetObject("WinMgmts:")
Set CompSys = EachType.ExecQuery("select version, name from win32_filespecification where name = '" & sPath & "'")

This does work:

Set EachType = GetObject("WinMgmts:").InstancesOf("Win32_FileSpecification")

For Each Directo In EachType
List1.AddItem "Name: " & Directo.Name
List1.AddItem "Caption: " & Directo.Caption
List1.AddItem "File ID: " & Directo.fileid
Next

But it only enumerates file for one directory, and I cant figure out how to get it to display infomation for a specific file in a specific directory.

Anyone out there used this before??

Keywords & Tags: wmi, win32_filespecification, dll, com, activex

URL: http://programming.itags.org/com-activex/174559/
 
«« Prev - Next »» 0 helpful answers below.

DLL & COM & ActiveX Hot Answers

DLL & COM & ActiveX New questions

DLL & COM & ActiveX Related Categories