• 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: Obtain computer model
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Obtain computer model


  • Subject: Re: Obtain computer model
  • From: Michael Hall <email@hidden>
  • Date: Sun, 24 Sep 2006 10:22:51 -0500


On Sep 24, 2006, at 9:48 AM, I. Savant wrote:


It may not be obvious which terms to search the archives for, but I found several posts under "computer model" that lead me to other posts, which led me to this basic search that seems most effective:


http://www.cocoabuilder.com/search/archive/cocoa?words=cpu+type

This should definitely get you going. You should spend at least a little time searching the list before posting; it's a great resource that's almost always overlooked.

--
I.S.


On Sep 24, 2006, at 10:33 AM, Claudio Procida wrote:

This sounds like a darwin-* question, anyway:

How can I obtain the computer model (e.g. "PowerBook6,5") and name ("iBook G4"), like in System Profiler.app ?

Google can work nicely too. Doing that for applescript cpu type

Got
http://lists.apple.com/archives/Applescript-studio/2006/Mar/ msg00128.html
which in turn converts to


osascript -e "return CPU type of (system info)"

If PowerPC 7450 seems more meaningful.

Or if you like System Profiler when you get farther down on the first results page there's
http://bbs.applescript.net/viewtopic.php?pid=47578
From which you can extract


system_profiler SPHardwareDataType

Some output parsing required.

Spending most of my time with java when you want something like this the quickest and easiest solution is usually something you can Runtime exec. You don't want to get into JNI unless you have to.

If I remember right Cocoa's NSTask has sounded sort of similar for running commands?


Mike Hall mikehall at spacestar dot net http://www.spacestar.net/users/mikehall http://sourceforge.net/projects/macnative



Attachment: smime.p7s
Description: S/MIME cryptographic signature

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

This email sent to email@hidden

  • Follow-Ups:
    • Re: Obtain computer model
      • From: Shawn Erickson <email@hidden>
References: 
 >Obtain computer model (From: Claudio Procida <email@hidden>)
 >Re: Obtain computer model (From: "I. Savant" <email@hidden>)

  • Prev by Date: Re: Re: Obtain computer model
  • Next by Date: Scaling view and draw one pixel line
  • Previous by thread: Re: Obtain computer model
  • Next by thread: Re: Obtain computer model
  • Index(es):
    • Date
    • Thread