- Dim FilePath,WMIPathMode
- FilePath=InputBox("请输入文件全路径(例如以下路径格式)","文件路径","C:\windows\system32\user32.dll")
- If FilePath <> "" Then
- WMIPathMode=Replace(FilePath,"\","\\")
- Set OBJWMI = GetObject("winmgmts:\\.\root\CIMV2")
- Set colManufacturer = OBJWMI.ExecQuery("SELECT * FROM CIM_DataFile Where Name='" & WMIPathMode & "'")
- For Each OBJManufacturer In colManufacturer
- If Trim(OBJManufacturer.Manufacturer) <> "" Then
- MsgBox "文件全路径是: "&LCase(Trim(OBJManufacturer.Name))&chr(10)&"文件制造商是: "&Trim(OBJManufacturer.Manufacturer)
- Else
- MsgBox "文件全路径是: "&LCase(Trim(OBJManufacturer.Name))&chr(10)&"文件制造商是:空"
- End If
- Next
- End If
复制代码
|