Enumerate H/W Devices on win32

B

Ben Cartwright

Hello,

Is there a way, using Java, to determine and to enumerate the hardware devices
installed on a win32 machine?

Thanks,
Ben
 
M

Michiel Konstapel

Is there a way, using Java, to determine and to enumerate the hardware
devices installed on a win32 machine?

Only through some pretty black JNI magic, I reckon...
Michiel
 
T

Tor Iver Wilhelmsen

Ben Cartwright said:
Is there a COM mechanism to do this, perhaps?

Well you could ask the registry for the keys under
"HKLM\Software\Javasoft\Java Runtime Environment"
 
C

Chris Uppal

Ben said:
Is there a COM mechanism to do this, perhaps?

If you don't want to dive into JNI, but are OK with COM, then you should be
able to get the info you need via "Windows Management Instrumentation" (which
is COM based).

For an intro see:
http://msdn.microsoft.com/msdnmag/issues/0400/wmi/default.aspx

For details see:
http://msdn.microsoft.com/library/en-us/wmisdk/wmi/wmi_start_page.asp
and specially:
http://msdn.microsoft.com/library/en-us/wmisdk/wmi/com_api_for_wmi.asp

But be aware that:

a) it's not installed by default on Window's boxes before WinXP, which may
limit it's use for you.
b) it's pretty general, hence complicated.

-- chris
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top