make a myauturun.plist file to
/System/Library/LaunchAgents/myautorun.plist
please refer to developer.apple.com launchd.plist
key:
KeepAlive RunAtLoad LaunchOnlyOnce all to true
if call another process
please use
launchctl load "*.plist" ,because launchd not support fork followed by execl
put to /System/Library/LaunchAgents user priviledge
put to /System/Library/LaunchDaemon root priviledge