Add login items script

Discussion in 'Mac Programming' started by andrewheard, Apr 18, 2006.

  1. macrumors regular

    May 16, 2005
    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,

  2. Moderator emeritus


    Jun 15, 2000
    set appPath to "/Applications/"
    tell application "System Events"
    	make login item at end with properties {path:appPath, hidden:false}
    end tell
  3. macrumors 68000

    Feb 23, 2006
    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.

Share This Page