Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Wmi and LogicalDevice List
Message
De
15/11/2007 10:13:53
 
 
À
15/11/2007 09:48:31
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01269129
Message ID:
01269157
Vues:
16
Hi Tracy,
Thank you. please send it to denis.gavrikov@mks-ag.de or denis.gavrikov@mail.ru

Denis

>I tried to send you a project which does this. It consists of one prg and one form with the code in the form methods but your mail server keeps rejecting it with 'illegal attachment' messages returned.
>
>>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform