Run script on startup?

I have a script that I would like to run when the machine starts up. I would like to do this by adding the code inthe script instead of having to go to the Preferences Pane. Can somebody tell me if this is correct or not and how I can go about making sure it’s set to startup upon login? I went to my user account and looked under the Startup Items after running the script but it isn’t showing up.

tell application "System Events"
	make login item at end with properties {path:"Applications:App", hidden:false}
end tell

Any help would be greatly appreciated.

Two things: you have to use the complete path to the application including the HD name, not just the Applications folder (you can get this programmatically, however) and the path has to be a POSIX path:


[This script was automatically tagged for color coded syntax by Convert Script to Markup Code]