I'd like to be able to auto launch my app at startup...

I’m trying to write an applescript to setup users machines to auto launch my app at startup but am having trouble creating a folder in the root Library:StartupItems folder. It looks like an admin password needs to be supplied or something??? Is there some way to do this- maybe prompt for the password?

Thanks for the help!



you can create folders in an restricted area only with the shell

do shell script "/bin/mkdir -p /path/to/folder" with administrator privileges

but this can also cause problems. You can set the access privileges with the -m switch, but owner and group might be wrong.
Note: the -p switch creates intermediate directories and doesn’t report any error if the target directory already exists.

An user based installation is much easier, just add the app to the startup items in System Preferences > Accounts

Thanks StefanK…appears to be just what I needed.