I am struggling to get the list of installed applications/programs on MacOS using visual studio 2019 c#. Can anyone advise me how I can get that?
Asked
Active
Viewed 567 times
1
-
Hi,I have written the program in c# for windows that is reading all the installed programs and version number and then exported it to .csv file. I am trying to achieve the same goal for macOS. I am using .NET Core 3.1. I can read the registry keys for windows as @OlivierRogier mentioned but what about MacOS. It has a different architecture. – Mic Jan 24 '21 at 15:57
-
Had you take a look for example at https://stackoverflow.com/questions/24280878/how-can-i-get-list-of-installed-applications-on-mac-os-x-programmatically and https://gist.github.com/benbalter/3db34485f49006c60129 and https://developer.apple.com/documentation/devicemanagement/list_the_installed_apps – Jan 24 '21 at 16:03
-
I did look into the reference links but I guess the first one is using some different technology than c# and my apologies, I am not macOS expert so did not get the second one correctly, How I can make use of it and how I can setup MDM domain on macbook. – Mic Jan 24 '21 at 16:19
-
I'm not familiar with macOS, but maybe it seems (*Availability iOS 5.0+, macOS 10.7+, tvOS 10.2+*) you can use this HTTP API to get an XML result for processing. In this case, you can use [WebClient](https://learn.microsoft.com/dotnet/api/system.net.webclient) and any XML Parser you like, and why not LINQ to XML. – Jan 24 '21 at 16:23
-
Can any other expert help me on it? – Mic Jan 24 '21 at 23:07