Can I issue WMI WQL queries in plain C? And if so, how?
You can use any programming language that you want, as long as you can call the COM API for WMI .
It looks like you can do such things using ExecQuery (), although this example is in C ++. By the way, this guy couldn't make him work, but you can check what he is doing.
Hope this helps.
http://forums.devshed.com/c-programming-42/wmi-wql-querying-problem-in-c-215026.html
More WMI programming:
http://www.vedivi.com/blog/2008/05/how-to-enable-remote-desktop-programmatically/