• 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: "Kyle Sluder" <email@hidden>
  • Date: Tue, 12 Aug 2008 13:04:41 -0400

On Tue, Aug 12, 2008 at 12:01 PM, GARRISON, TRAVIS J. <email@hidden> 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.

What is it you're trying to do?  If you need the user's username,
there are two functions for that: NSFullUserName (long user name) and
NSUserName (short name, aka the UNIX username).  If you need their
home directory, use NSHomeDirectory.  If you're trying to do
authentication, you should really be using Kerberos.  If the account
exists in an Open Directory or Active Directory domain, you may need
to use Directory Services to get the info you're after...

So, in other words, we really need to know your specific goal.

--Kyle Sluder
_______________________________________________

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: Determine who ran an application
  • Next by Date: Re: Disc write speed options
  • Previous by thread: Re: Determine who ran an application
  • Next by thread: Re: Determine who ran an application
  • Index(es):
    • Date
    • Thread