Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > How to get the Mac's serial number

How to get the Mac's serial number
Thread Tools
Mac Elite
Join Date: Sep 2000
Location: Norfolk, Va
Status: Offline
Reply With Quote
Jun 10, 2003, 12:35 PM
 
It can't be that hard, if the "About this Mac" box can get it (just click on the OS version number to see yours). And I beleive that System Profiler retreives it too.

I would like to use this unique, programatically attained number in my registration scheme. I'm thinking that, with the users consent, I'll keep a log of which serial logs on with which licence key. If it changes once every six months, or if 2 computers are consistently logging on, big deal. But if 32 different machines are using the same licence, then there's a pirating issue. I could also then (wait for it) use this to automatically update the licence number of the oldest still-accessing serial number, painlessly locking out pirates while keeping the fair-user unaware.

So anyway, you can see that this is important to my scheme. I guess I could use ethernet cards, but it seems less... accurate.
you are not your signature
     
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status: Offline
Reply With Quote
Jun 10, 2003, 01:23 PM
 
Ethernet cards are the way to go. How is it less accurate? Every Mac that can run OS X has on-board ethernet. Just use that.
     
Dedicated MacNNer
Join Date: May 2001
Location: Edinburgh, UK
Status: Offline
Reply With Quote
Jun 11, 2003, 10:15 AM
 
This is not a method that should be used for copy protection since not all Macs have a serial number. I have to agree that the MAC address would be a far better way of doing this.
     
Gametes  (op)
Mac Elite
Join Date: Sep 2000
Location: Norfolk, Va
Status: Offline
Reply With Quote
Jun 11, 2003, 11:42 AM
 
So not all Macs, upon clicking on the OS version number in the Mac OS X "About this Mac" box, show a serial number?

I figured any computer that can run OS X has a serial number.
you are not your signature
     
Professional Poster
Join Date: Sep 1999
Location: Ottawa, ON, Canada
Status: Offline
Reply With Quote
Jun 11, 2003, 12:12 PM
 
Originally posted by Angus_D:
Ethernet cards are the way to go. How is it less accurate? Every Mac that can run OS X has on-board ethernet. Just use that.
Some Macs have more than one Ethernet card. Your code will have to explicitly look for the one on the motherboard. Just be sure not to check the "active" ethernet card.
     
Dedicated MacNNer
Join Date: May 2001
Location: Edinburgh, UK
Status: Offline
Reply With Quote
Jun 11, 2003, 12:21 PM
 
Originally posted by Gametes:
So not all Macs, upon clicking on the OS version number in the Mac OS X "About this Mac" box, show a serial number?

I figured any computer that can run OS X has a serial number.
I think any Mac before the first UMA machines lack this serial number. As far as I can remember the first UMA machine was the original iBook. I certainly know that my 233MHz iMac does not display this serial number at all while my iBook 500 and PowerMac G4 450 both do.
     
Mac Elite
Join Date: Feb 2001
Location: Vancouver, WA
Status: Offline
Reply With Quote
Jun 11, 2003, 04:11 PM
 
iJed is correct: the 1999 "UMA" motherboards were the first to be capable of reporting their serial number. Mac OS X is supported on several machines prior to that: all beige G3s, all blue & white Power Mac G3s, the "Wall Street" and "Lombard" PowerBook G3s, and the first-generation iMacs (Bondi and five-flavor, 233/266/333 MHz).

(An interesting aside: the iMacs and iBooks which can report their serial number can also report their sales order number, from which you can determine their case color.)

IIRC, the preferred API for getting at the serial number and related info is IOKit. I think there might be a technote on it at developer.apple.com somewhere.

However, I recommend against using the hardware serial number as part of a registration scheme, as it is somewhat sensitive information. The hardware ethernet address is unique to a single machine, but it doesn't identify the machine or its owner. By contrast, with the serial number it may be possible to track down a machine and its owner, or even impersonate the owner in dealings with AppleCare.

Actually, I'd object to your registration scheme in general -- it sound like the sort of thing users are apt to call "spyware". If you pursue this scheme, at least be upfront about it: make sure users know what it does before they run your software.
Rick Roe
icons.cx | weblog
     
Gametes  (op)
Mac Elite
Join Date: Sep 2000
Location: Norfolk, Va
Status: Offline
Reply With Quote
Jun 11, 2003, 06:01 PM
 
It's an always online app, and I was definitely going to let users know that this was going to happen. Personally, I find spyware disgusting, but I don't think checking at startup for registration is spyware; according to that definition anything that confers with the product's home server is spyware. It's only spyware if I use it to track the user's habits, and I wouldn't invade peoples' privacy like that.
Speaking of privacy, if it's true that a serial number could be used to impersonate someone, then I'll reconsider using it anyway.
I do not want people even fearing impropriety

lol, especially when you see my product (you will eventually).
you are not your signature
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 03:41 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2