Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Wmi and LogicalDevice List
Message
From
16/11/2007 07:44:04
 
 
To
16/11/2007 04:47:01
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01269129
Message ID:
01269375
Views:
10
You're welcome. Feel free to improve upon it. :o)


>Hi Tracy,
>Thanks again. your code very help me! It was real solution what I looked for.
>
>Denis
>
>>I am not sure if this is the most recent, or even the same project I was sending you, but you can try this:
>>
>>Download #32483
>>
>>>Hi,
>>>I need to return device list with DeviceId from the windows system devices. For this reason I try to use WMI
>>>
>>>
>>>objService = Getobject("winmgmts:{impersonationLevel=impersonate}!\\.\root\CIMV2")
>>>loPnPCollection = objService.ExecQuery("SELECT * FROM CIM_LogicalDevice")
>>> For Each objPnP  In loPnPCollection
>>>    lcDeviceName = objPnp.name
>>>    lcDeviceId = objPnP.DeviceID
>>> Next
>>>
>>>
>>>All works perfect BUT....
>>>The some devices which listed in the category "Other Devices" - and has "Question mark" icon - not listed by WMI.
>>>I can't find a solution to get thouse devices and deviceId string.
>>>
>>>Any help!
>>>Thanks
>>>Denis
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Previous
Reply
Map
View

Click here to load this message in the networking platform