What is the Equivalent of Windows WMI for MacOS C++ Development?
Asked Answered
C

2

9

I have a C++ application that gets detailed system information (processor type, available disk space, other hardware profile info) on Windows using WMI. I want to perform the same type of operations on OSX 10.5+. What is the equivalent API or interface for MacOS?

Links to API documentation or tutorials are very welcome.

Crofoot answered 31/8, 2010 at 21:26 Comment(1)
Are you looking for a way to get information about the Mac system, or are you looking for a WBEM implementation?Okeefe
J
7

You can query most of that information through the system_profiler executable. Apple's example for querying such informations involves a popen call to it, so I guess it's the way to go.

Joly answered 31/8, 2010 at 21:32 Comment(1)
Seems like the Apple way is a little odd, but it'll do. Thank you for the help. :)Crofoot
L
0

system_profiler is not the exact equivalent for WMI. It has only local access. MacOs seem to lack support for that. Luckily microsoft has developer OMI for that purpose https://github.com/microsoft/omi/releases

Lamented answered 1/1 at 16:12 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.