Lightweight Activation method like Windows XP

Windows XP activation checks following things in computer and is activated

The following 10 hardware characteristics are used to determine the hardware hash:

Display adapter

SCSI adapter

IDE adapter

Network adapter media access control address

RAM amount range (for example, 0-64MB or 64-128MB)

Processor type

Processor serial number

Hard disk device

Hard disk volume serial number

CD-ROM/CD-RW/DVD-ROM drive

i want to use similar technique like this but a lightweight version. Idea is that once a user logs in my program(custom authentication), it will detect all or some of these and associate login with that computer.

That way, that user will only be allowed to login from that computer.

Main thing is how that i can detect the things mentioned above. Are there are any built in classes available or i have to use unmanaged code or some low level api's to get this info..



Answer this question

Lightweight Activation method like Windows XP

  • nato4

    thanks a lot, this is exactly what i was looking for...

    i will look into this...


  • Otto Ramirez

  • r0d

    yes, that i will have to think of...

    Can you pls advs me how i can get the mac address of the network adapter which is used to connect to local area network as it is returning a long list of adapters on my computer, whereas i just need the one through which user connects locally to the network


  • frk

    I would just pick the first one, then walk the list later to try to find a match...


  • Douglas Stockwell

    Yes, mac address is also in my lists.. i have 2 queries for this.

    Firstly how i can get the mac address of the network adapter which is used to connect to local area network as it is returning a long list of adapters on my computer, whereas i just need the one through which user connects locally to the network..

    Secondly for getting Hard Disk Serial Number, i'm first retreiving info from :-

    Win32_OperatingSystem :- SystemDrive

    This returns the system drive through which system was booted then i'm getting

    VolumeSerialNumber

    by matching caption property

    Is this the right way or am i doing something wrong


  • Caliendo

    You could associate the activation record with the MAC address for one of the LAN adapters. MAC addresses are guaranteed to be unique and almost all PCs nowadays have a network adapter. Use NetworkInterface.GetPhysicalAddress() to retrieve the MAC.


  • shivali.sadavarte

    i found few more properties on determining correct network adapter which is used for connecting with local network and i'm posting it here :-

    This is msdn link for detailed documentaiton

    http://msdn.microsoft.com/library/default.asp url=/library/en-us/wmisdk/wmi/win32_networkadapter.asp

    Class is Win32_NetworkAdapter

    Property AdapterType returns Ethernet 802.3 for the ethernet adapter

    Availability value of 3 means running in full/power

    NetConnectionStatus value of 2 means connected..

    Macaddress returns the mac address..

    By checking above properties, we can locate Network adapter used for connecting to Lan...


  • dejan djenic

    No, looks fine. The wrath of your customer having her licensed copy of your software deactivated by a hardware upgrade is yours to deal with...



  • Lightweight Activation method like Windows XP