• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Installing a new login item?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Installing a new login item?


  • Subject: Re: Installing a new login item?
  • From: Bill Bumgarner <email@hidden>
  • Date: Tue, 2 Jul 2002 09:28:02 -0400

Use the CFPreferences API to access the 'AutoLaunchedApplicationDictionary'
item within the 'loginwindow' domain (identifier).

With that API, you can retrieve that preference directly as a property list as a CFArray. A CFArray can be transparently typecast to an NSArray.
So:

... retrieve default via CFPreferences ...

NSMutableArray *moddedPrefs = [...retrieved default... mutableCopy];
... add your NSDictionary intstance here ...

... write moddedPrefs back to defaults database via CFPreferences ...

Make sure to call the preferences synchronization function to force the prefs to be written to disk.

b.bum

On Tuesday, July 2, 2002, at 06:50 AM, email@hidden wrote:
Hi,

Is there a specific API to add an application to the launch at login list or
do I have to manually edit the "~/Library/Preferences/loginwindow.plist"
file?

Thanks!
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Installing a new login item?
      • From: Pierre-Olivier Latour <email@hidden>
  • Prev by Date: Re: When performing privileged operations...
  • Next by Date: Re: Cocoa stripping resource forks: does Jaguar fix?
  • Previous by thread: Re: Installing a new login item?
  • Next by thread: Re: Installing a new login item?
  • Index(es):
    • Date
    • Thread