问题
I need to get list of installed applications on leopard / snow leopard. Can any one suggest me how I can get list of installed apps using my cocoa application.
I have tried using "system_profiler SPApplicationsDataType". Problem with this is it just lists out *.app files, which includes the drivers as well. Is there a way to get only list of "installed apps".
回答1:
You might be able use to use system_profiler -xml SPApplicationsDataType
and then parse the resulting XML data to get just the applications that you are interested in.
来源:https://stackoverflow.com/questions/3003748/how-to-get-list-of-installed-applications-on-mac