Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Apr 18, 2006, 07:16 PM   #1
andrewheard
macrumors regular
 
Join Date: May 2005
Location: Ontario, Canada
Send a message via MSN to andrewheard
Add login items script

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
andrewheard is offline   0 Reply With Quote
Old Apr 18, 2006, 08:08 PM   #2
kainjow
Demi-God (Moderator emeritus)
 
kainjow's Avatar
 
Join Date: Jun 2000
Code:
set appPath to "/Applications/MyProgram.app"
tell application "System Events"
	make login item at end with properties {path:appPath, hidden:false}
end tell
kainjow is offline   0 Reply With Quote
Old Apr 18, 2006, 10:11 PM   #3
SC68Cal
macrumors 68000
 
Join Date: Feb 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.
SC68Cal is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
Applescript Question---- Add to login items jjordanlam Mac Programming 4 Jan 22, 2011 03:29 PM
On Idle Script in Login Items Doesn't Stay Open astrorider Mac Programming 0 Nov 12, 2010 01:39 AM
Duplicate folder names on different servers will not add to login items jiwald OS X 1 Aug 20, 2010 11:32 AM
managed accounts cannot add login items islandsnow Mac OS X Server, Xserve, and Networking 6 May 29, 2008 10:29 AM
Add a volume to login items. atmporsh911 Mac Basics and Help 3 Oct 24, 2007 06:33 PM


All times are GMT -5. The time now is 07:20 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

Privacy / DMCA contact / Affiliate and FTC Disclosure
Copyright 2002-2013, MacRumors.com, LLC