Re: Getting Computer Name
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