How do I programmatically set an application bundle on Mac OS X to run when the user logs in?
Basically, the equivalent of the HKCU\\Software\\Microsoft\\Windo
A working example below.
Create a file
~/Library/LaunchAgents/my.everydaytasks.plist
With contents:
Label
my.everydaytasks
ProgramArguments
/Applications/EverydayTasks.app/Contents/MacOS/EverydayTasks
ProcessType
Interactive
RunAtLoad
KeepAlive
See the original post that helped me to make this example:
https://superuser.com/a/229792/43997
To test you need to run this in terminal
launchctl load -w ~/Library/LaunchAgents/my.everydaytasks.plist
To unload
launchctl unload -w ~/Library/LaunchAgents/my.everydaytasks.plist
See also
https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man5/launchd.plist.5.html
The is the other way of adding your application to starup using "Login Items". See this example project on how to implement it:
https://github.com/justin/Shared-File-List-Example