How to get list of installed applications on mac

*爱你&永不变心* 提交于 2019-12-10 12:13:50

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!