Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Get Machine Type string



In 10.2, it's here:

/usr/sbin/AppleSystemProfiler

There's a problem with using the command-line profiler tool under 10.3, however, because instead of generating a report on its own, I believe it just launched the GUI system profiler app. (Corrected in Tiger.)


-- m-s

On 28 Jul, 2006, at 11:53, matt jaffa wrote:

The tricky part is I am looking for a solution that works all the way
back to 10.2 and above. The command line system_profiler doesn't exist
on 10.2. sysctl doesn't provide a nice enough readable string. The
system_profiler for 10.4 provides a great Machine Name string that
describes the machine type. So unfortunately it looks like I am going
to have to translate the MacBookPro1,1, etc. on my own.

On 7/28/06, Shawn Erickson <email@hidden> wrote:

On Jul 28, 2006, at 7:51 AM, matt jaffa wrote:

> Hi,
>
> Is there any cocoa api or other api that can get what type of machine
> it is. i.e. MacBook Pro, Powerbook, etc. I can easily get the machine
> model like MacBookPro1,1.


I should likely also mention using system_profiler and parsing the
output.

For example "system_profiler -xml SPHardwareDataType" (-xml gives you
a plist) and pull out the "machine_name" entry.

-Shawn

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/mikey-san% 40bungie.org


This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >Get Machine Type string (From: "matt jaffa" <email@hidden>)
 >Re: Get Machine Type string (From: Shawn Erickson <email@hidden>)
 >Re: Get Machine Type string (From: "matt jaffa" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.