OSX 10.8 LoginItems

泪湿孤枕 提交于 2019-12-02 09:33:25

问题


I found this Add app to OSX "Login Items" during a Package Maker installer postflight script but it doesn't appear to work in OSX 10.8?

This is from the other question and works in everything else...

defaults write \
    /Library/Preferences/loginwindow \
    AutoLaunchedApplicationDictionary \
    -array-add '{ "Path" = "/path/to/script"; "Hide" = "0"; }'

How can I add my app to loginItems in OSX Mountain Lion (10.8)?


回答1:


OS X 10.8 is under NDA, we are not at liberty of giving details about it but i can tell you that there is no /Library/Preferences/loginwindow under 10.7 or any other recent OSX version, you should be doing :

defaults write \
    ~/Library/Preferences/loginwindow \
    AutoLaunchedApplicationDictionary \
    -array-add '{ "Path" = "/path/to/script"; "Hide" = "0"; }'

Notice the "~" tilde was missing




回答2:


OS X 10.8 stores login items in com.apple.loginwindow.plist



来源:https://stackoverflow.com/questions/9483959/osx-10-8-loginitems

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