• 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: Getting Computer Name
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting Computer Name


  • Subject: Re: Getting Computer Name
  • From: Steve Steinitz <email@hidden>
  • Date: Mon, 21 Jun 2010 09:26:36 +1000

Thanks Jonathan Mitchell, John Joyce, Paul Sanders and Jens Alfke.


John:

Bingo! CSCopyMachineName() works perfectly.

To answer your question, I want a human-readable machine identifier, but one that's not tied to the hardware, the way, say, serial number is.

Our Core Data point-of-sale system has 8 machines making sales and I'm thinking of tagging each sale, for several reasons. Some examples:

    1. to temporarily hide sales that are in progress on other machines.
       I currently do that but in a more awkward way,

2. to know where sales are actually occurring, to get a sense of
wear and tear on printers and other disposable hardware, etc.


3. Maybe to compare the performance of the different shop floors in
an employee-independant way. The director suspects that employees
who go downstairs become "slackers" :)



Jonathan:

I confirm that

    #import <SystemConfiguration/SCDynamicStoreCopySpecific.h>

allows

NSLog (@"machine %@", NSMakeCollectable (SCDynamicStoreCopyLocalHostName (NULL)));

and, I assume, similar forms, to work.  Who'd a thunk it?

Thanks again to all of you.

Cheers,

Steve

_______________________________________________

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


  • Follow-Ups:
    • Re: Getting Computer Name
      • From: John Joyce <email@hidden>
    • Re: Getting Computer Name
      • From: Kyle Sluder <email@hidden>
References: 
 >Re: Getting Computer Name (From: "email@hidden" <email@hidden>)

  • Prev by Date: Re: [Cocoa-students] NewStyle Preferences
  • Next by Date: Re: Getting Computer Name
  • Previous by thread: Re: Getting Computer Name
  • Next by thread: Re: Getting Computer Name
  • Index(es):
    • Date
    • Thread