[MacRuby-devel] Computer Serial Number

Henry Maddocks henry.maddocks at gmail.com
Tue Apr 5 14:26:21 PDT 2011

On 6/04/2011, at 9:10 AM, Robert Rice wrote:

> Hi Gang:
> Could anyone help me to read the computer's serial number from a MacRuby program. Since I don't know Objective C, I haven't been able to figure out how to access it.

system_profile = `system_profiler SPHardwareDataType`
serial_number = system_profile.match(/Serial Number.*: (.*)/)[1]


More information about the MacRuby-devel mailing list