problem with WMI

I need to have some unique id from pc components in my project. i tryed to use WMI (Win32_PhysicalMedia and Win32_Processor classes) but there are two problems:

[color=Red]1- sometimes WMI doesn't return related data for a specific hardware. for example if the pc which has a SATA hard disk, WMI returns null as serial number. there is same problem with some processors.

2- sometimes WMI needs administrator permission. for example only administrator can get hard disk serial number with Win32_PhysicalMedia. it makes problem when i want to use this data in a software lick where the end user is not system administrator.[/color]

i tryed to use DeviceIOControl to obtain SATA hard disk serial number.it works but second problem (admin permission) already exist.

now i have two questions:
[color=Blue]1- is there any solution for handling these problems in WMI?
2- is there any other way to get hardware unique id except than WMI?
[/color]
thanks
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories