you can also try WMI using Java.

you can see an example of how its done using vbscript. Then adapt the WMI code portion with Java.