Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Login item support for Panther, Tiger and Leopard



On 31.01.2008, at 10:41, Apparao Mulpuri wrote:
Third, i have to update the loginwindow.plist file using Cocoa/Carbon
application. But, this is not the solution, which i am looking for. I have
to acheive this functionality at the time of Installation i.e using
Installer scripts.


Check out the defaults command line tool. That lets you edit a plist from a shell script. Although the officially recommended way is to use Apple Events. So, you could try to run an AppleScript that adds your app to the login items using the osascript command from your postinstall(?) script.

Haven't had to do an installer yet, but I'd think that you could also launch your cocoa application from the shell script.

One thing to note, though: If your application isn't installed per- user, but rather globally for the whole Mac in /Applications, only the user your installer runs as will get the login item. That's why many applications require you to launch them once after installation, and then they add themselves to the login items. That way, every user who wants to run the app gets the login item registration. E.g. iCal and iTunes do that with their helper applications.

Cheers,
-- M. Uli Kusterer
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de




_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >Login item support for Panther, Tiger and Leopard (From: "Apparao Mulpuri" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.