Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

jashsayani

macrumors 6502
Original poster
Feb 7, 2009
299
130
Redwood City, CA
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

macrumors newbie
Feb 7, 2009
2
0
USA
something like:
set sysInfo to do shell script "system_profiler SPHardwareDataType"
display dialog sysInfo
 

jashsayani

macrumors 6502
Original poster
Feb 7, 2009
299
130
Redwood City, CA
Thanks a lot for the reply.

When I type this in the terminal, I get the basic info:
Code:
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

macrumors 6502
Mar 8, 2004
404
1
typing "man system_profiler" will give you the commands you need to extract the data you want.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.