• 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: launch agent questions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: launch agent questions


  • Subject: Re: launch agent questions
  • From: Satoshi Matsumoto <email@hidden>
  • Date: Wed, 14 Jun 2006 07:21:53 +0900
  • Thread-topic: launch agent questions

on 06.06.14 6:51 AM, Alex Sheh at email@hidden wrote:
> I have a launch agent that I want to run whenever the user logs in via
> the GUI window.  I noticed that I need to call system("launchctl unload
> com.myCompany.myAgent.plist") at then very end of executable myAgent, in
> order for my launch agent to be run again after logging out and logging
> back in via GUI.  Otherwise my launch agent plist remains loaded and the
> next time I log back in, nothing happens.  Is this method of unloading
> at the end of the executable reasonable, or is there another more
> standard way of doing this?

How about this carbon function?

Boolean CFPreferencesAppSynchronize ( CFStringRef applicationID );

Writes to permanent storage all pending changes to the preference data for
the application, and reads the latest preference data from permanent
storage.

Satoshi
-----------------------------------------------------
Satoshi Matsumoto <email@hidden>
816-5 Odake, Odawara, Kanagawa, Japan 256-0802


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >launch agent questions (From: "Alex Sheh" <email@hidden>)

  • Prev by Date: Re: Programmatically restarting Mac OS X
  • Next by Date: Overriding NSDocument's "document could not be opened" error message
  • Previous by thread: launch agent questions
  • Next by thread: Re: launch agent questions
  • Index(es):
    • Date
    • Thread