Maybe you can use a WMI object like this guy:
http://bytes.com/forum/thread347497.html