Search code examples
c++qtubuntuwmiwmic

How to use wmi in Ubuntu with C++


I want to get information from my Client's that running Windows through Linux.

I have several clients that running Windows, and I'm running Ubuntu. I want to make a C++ code, and get information like CPU usage, disk space, etc from my client's.

Is there any way to do that?

I know I can use WMIC (WMI Client) and execute query (WQL) from terminal, but I want to use some libraries in C++ (I use Qt Creator).


Solution

  • First Create an application using the following library

    http://msdn.microsoft.com/en-us/library/aa390423(v=vs.85).aspx

    and send this information back to the ubuntu either using sockets or any other ports or simply save it into a txt file and access that file using ftp.

    http://msdn.microsoft.com/en-us/library/aa394558(v=vs.85).aspx

    Is there any C++ library to work with WMI?