Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

andrewheard

macrumors regular
Original poster
May 16, 2005
166
0
Ontario, Canada
Is it possible to add an application to the login items of a user account using a script? I was going to have an installer for my little program and I think that it would make it easier for users if they didn't have to add it themselves. This works but it would then be difficult for the user to uninstall the application.

Thanks in advance,

Andrew
 
Code:
set appPath to "/Applications/MyProgram.app"
tell application "System Events"
	make login item at end with properties {path:appPath, hidden:false}
end tell
 
As an alternative, save the script as an application and add it to your login items in the system preferences. That way, the program does not inheriently start up at login, I'm not a big fan of that myself.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.