• 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: Determine who ran an application
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Determine who ran an application


  • Subject: Re: Determine who ran an application
  • From: Jason Coco <email@hidden>
  • Date: Tue, 12 Aug 2008 13:03:20 -0400


On Aug 12, 2008, at 12:01 , GARRISON, TRAVIS J. wrote:

I am new to Cocoa and Xcode, so please bear with me. I am editing an
existing application that we have. The application is set to run when
the user logs into the machine through a loginHook. We have to pass the
%USER% variable as an argument. I would like to pull the username from
directly in the application. I tried to Google for this but did not have
any luck. Any ideas?

If you just need the basic user id, you can use getuid(2). There are various API in the security frameworks and the directory services (10.5+) frameworks that map it to more useful Mac OS Specific user information.

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

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:

This email sent to email@hidden

References: 
 >Determine who ran an application (From: "GARRISON, TRAVIS J." <email@hidden>)

  • Prev by Date: Re: Accessing memory of another application?
  • Next by Date: Re: Determine who ran an application
  • Previous by thread: Determine who ran an application
  • Next by thread: Re: Determine who ran an application
  • Index(es):
    • Date
    • Thread