03-17-2014 09:52 AM
Hi
i am writting an application which will encrypt the motherboards serialnumber and other info to do an activation of my application.
inevitably locking my program to a specific PC.
Does anyone know how i can get the motherboards serial number?
I tried the wmi but get so many errors like missing prototype and not declared.
I dont know when to start using the Windows Management Instrumentation with regards to Lab windows/CVI.
Can anyone help me?
Thanks
Shako
03-18-2014 01:17 AM
You might have a look into the sourcecode of dmidecode for windows.
03-18-2014 06:20 AM
I made up a small example that shows how to use WMI in CVI.
Unfortunately, I tested it on two systems (Win XP and Win7) and the serial number that can be retrieved in System Enclosure (that should be the S/N assigned by the PC producer) is always blank.
I will try to locate additional infos on this matter, in the meanwhile you may want to experiment with the example and search for other available infos (like for example OS or disk s/n) to create your own security system.
The example can be found here.
03-18-2014 08:30 AM
usually to lock something to a particular PC they use the MAC address, which is easy to read. MAC addresses are unique - well for now as they are running out I think.
03-19-2014 04:11 AM - edited 03-19-2014 04:12 AM
@cymrieg: you're right, MAC address is the most common hardware-related data used for this case.
I have modified my sample code to retrieve informations on network adapters, optionally limiting search to physical adapters only.
On the other hand, this old post from Al_S shows another method to retrieve the MAC address for all adapters in the system. It's dated 2007 and I haven't tested it on modern systems, but I suppose it will still work.