3 ms·
It always seemed weird to me when people call shell binaries from the middle of a desktop app. What's wrong with finding the actual OS API instead?
by breppp 1y ago
It always seemed weird to me when people call shell binaries from the middle of a desktop app. What's wrong with finding the actual OS API instead?
- IshKebab 1y agoIt's a lot harder, and for these sort of things maybe not even possible. But yeah generally it is better if you can do it.
- jeroenhd 1y agoI tried to find the correct API for getting the current MDM enrollment status on macOS but I can't find anything other than people suggesting command line tools. Unless you're an MDM application yourself, I don't think there is an official API.
- breppp 1y agoThe Windows API was very easy to find. Generally if he can call an executable that can fetch that MDM status, it is almost certain that executable calls some function in some library to get it. I was curious so I checked, it uses CPProfileManager and CP_GetManagementStatus, a private undocumented MacOS API. That's one hostile OS, at least Microsoft was forced by court to open its APIs