简体   繁体   中英

OSX 10.8 LoginItems

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)?

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

OS X 10.8将登录项存储在com.apple.loginwindow.plist中

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM