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