PDA

View Full Version : Fetching system information




jashsayani
Feb 7, 2009, 07:40 AM
I want to make a simple Cocoa app that displays system information like Serial No, HD space, IP Address, OS Info, etc.

How do I fetch the info and display it in the app ?



bascov
Feb 7, 2009, 07:53 PM
something like:
set sysInfo to do shell script "system_profiler SPHardwareDataType"
display dialog sysInfo

jashsayani
Feb 9, 2009, 02:47 AM
Thanks a lot for the reply.

When I type this in the terminal, I get the basic info:
system_profiler SPHardwareDataType

Now, how do I separately display Memory, Serial No., Cache, etc.
Explanation with 2 lines of code (getting info and displaying) would be great as I'm new to Cocoa programming.

Thanks.

Mac_Max
Feb 9, 2009, 01:28 PM
typing "man system_profiler" will give you the commands you need to extract the data you want.