On Sep 3, 2009, at 10:56 AM, Scott Lahteine wrote:

CSCopyMachineName() returns the name of the computer as set by the user in the Sharing preference pane, which is not the same thing as the gestaltUserVisibleMachineName. The "Machine Name" I want is the Apple-defined identifier for the type of computer, which (as of this date) begins with one of the following strings:

"AAPL ","iMac ","PowerBook ","PowerMac","RackMac","Macmini","MacPro","MacBookPro","MacBook"

For example, my computer is identified by Gestalt() as a "MacBook2,1"

On the other hand, I see that same string through ioreg on the command line, so perhaps there's a way to get it from the IO Registry?


First the question is "Why do you need to know?" If your basing feature decisions on this info, then you should probably go another route.

But if you must know this for other reasons, the way to get it programmatically is via sysctlbyname using "hw.model".
--
David Duncan
Apple DTS Animation and Printing

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to