[Qt-interest] Mac OS machine identification

Mike Jackson imikejackson at gmail.com
Fri Jan 23 02:29:33 CET 2009


On 2009-01-21 10:13:50 -0500, Arnold Krille <arnold at arnoldarts.de> said:

> --nextPart2688375.Hs5du3m0yD
> Content-Type: text/plain;
>   charset="iso-8859-1"
> Content-Transfer-Encoding: quoted-printable
> Content-Disposition: inline
> 
> On Wednesday 21 January 2009 14:59:45 Serge wrote:
>> i'm writing trialware protection for QT program on Mac OS.
>> Is there any way to receive serial numbers of HDD, BIOS ...
>> so that uniquely identify machine?
> 
> Somehow I am not convinced that this will work and not result in a fiasco l=
> ike=20
> Microsofts product certification. (Try replacing your graphics card and hav=
> e=20
> fun with re-enabling your (legal) windows copy.)
> 
> Why not make your trial ware have less features? A good feature to leave ou=
> t=20
> in the trial ware is the "Save to file"-feature. Or do it as some sound edi=
> tor=20
> once did: at start-up present a dialogue-box where only two of a list of=20
> feature-sets can be chosen per run.Maybe combined with the disabling of=20
> "save"...
> 
> Arnold


try the following link:

http://www.cocoadev.com/index.pl?HowToGetHardwareAndNetworkInfo


Look for the part specifically about
/* copied from http://cocoa.mamasam.com/COCOADEV/2003/07/1/68334.php */
/* and modified by http://nilzero.com/cgi-bin/mt-comments.cgi?entry_id=1300 */
/* and by http://cocoa.mamasam.com/COCOADEV/2003/07/1/68337.php/ *
+ (NSString *)computerSerialNumber
{....


Every New Intel based Mac has a serial number encoded into the 
hardware. If you are trying to node lock a piece of software this would 
probably be the way to do it. Not sure when the serial numbers starting 
appearing for PPC macs.

To find out your serial number go to the "Apple" Menu, click on "About 
This Mac" and let the window appear. Now click on the on the OS X 
version number a few times and it will cycle through some values one of 
which is the serial number.

Note that to use the above calls you _might_ have to link against 
Carbon which is just fine BUT will STOP your application from _ever_ 
being a 64Bit application. If that isn't a problem then there ya go.

Mike Jackson




More information about the Qt-interest-old mailing list