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 stores login items in com.apple.loginwindow.plist