Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7167749
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T14:38:23+00:00 2026-05-28T14:38:23+00:00

I am creating a license that is specific to a machine. The license is

  • 0

I am creating a license that is specific to a machine. The license is based on the following items:

  1. MAC Address
  2. CPU Serial Number
  3. Computer Volume Serial Number of drive0

I am assuming that if 2 of the 3 match, then my license is valid. So, the can get a new network card, and the license is still valid, etc.

Is this a good approach or am I going to have issues with this not matching or changing regularly?

I’m trying to get a unique identifier for the computer so that I can validate the license.

Please let me know how this looks or if you have a better solution!

Thanks again!

** HERE IS WHAT I CAME UP WITH **

I ended up only using the VolumeSerial, CpuId, and VideoControllerDescription.

    public enum HardwareProfileComponents
    {
        ComputerModel,
        VolumeSerial,
        CpuId,
        MemoryCapacity,
        VideoControllerDescription
    }

    public static Dictionary<string, string> HardwareProfile()
    {
        var retval = new Dictionary<string, string>
                         {
                             {HardwareProfileComponents.ComputerModel.ToString(), GetComputerModel()},
                             {HardwareProfileComponents.VolumeSerial.ToString(), GetVolumeSerial()},
                             {HardwareProfileComponents.CpuId.ToString(), GetCpuId()},
                             {HardwareProfileComponents.MemoryCapacity.ToString(), GetMemoryAmount()},
                             {HardwareProfileComponents.VideoControllerDescription.ToString(), GetVideoControllerDescription()}
                         };
        return retval;

    }

    private static string GetVideoControllerDescription()
    {
        Console.WriteLine("GetVideoControllerDescription");

        var s1 = new ManagementObjectSearcher("select * from Win32_VideoController");
        foreach (ManagementObject oReturn in s1.Get())
        {
            var desc = oReturn["AdapterRam"];
            if ( desc == null) continue;
            return oReturn["Description"].ToString().Trim();
        }
        return string.Empty;
    }


    private static string GetComputerModel()
    {
        Console.WriteLine("GetComputerModel");
        var s1 = new ManagementObjectSearcher("select * from Win32_ComputerSystem"); 
        foreach (ManagementObject oReturn in s1.Get())
        {
            return oReturn["Model"].ToString().Trim();
        }            
        return string.Empty;
    }

    private static string GetMemoryAmount()
    {
        Console.WriteLine("GetMemoryAmount");
        var s1 = new ManagementObjectSearcher("select * from Win32_PhysicalMemory");
        foreach (ManagementObject oReturn in s1.Get())
        {
            return oReturn["Capacity"].ToString().Trim();
        }
        return string.Empty;
    }

    private static string GetVolumeSerial()
    {
        Console.WriteLine("GetVolumeSerial");
        var disk = new ManagementObject(@"win32_logicaldisk.deviceid=""c:""");
        disk.Get();

        string volumeSerial = disk["VolumeSerialNumber"].ToString();
        disk.Dispose();

        return volumeSerial;
    }

    private static string GetCpuId()
    {
        Console.WriteLine("GetCpuId");
        var managClass = new ManagementClass("win32_processor");
        var managCollec = managClass.GetInstances();

        foreach (ManagementObject managObj in managCollec)
        {
            //Get only the first CPU's ID
            return managObj.Properties["processorID"].Value.ToString();
        }
        return string.Empty;
    }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T14:38:25+00:00Added an answer on May 28, 2026 at 2:38 pm

    Here is a pretty decent article about how MS did it with Windows XP. Maybe not exactly what you’re looking for, but it’s a great jumping-off point.

    Windows XP Activation Explained

    What hardware does Windows check?

    The system checks these ten categories of hardware:

    • Display Adapter
    • SCSI Adapter
    • IDE Adapter (effectively the motherboard)
    • Network Adapter (NIC) and its MAC Address
    • RAM Amount Range (i.e., 0-64mb, 64-128mb, etc.)
    • Processor Type
    • Processor Serial Number
    • Hard Drive Device
    • Hard Drive Volume Serial Number (VSN)
    • CD-ROM / CD-RW / DVD-ROM
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Creating liquid layouts is an immense pain. Now, I totally understand that tables should
Creating a google map with store locations within 50 miles of user entered address.
I'm creating a weather module for an application that uses weather.com's xml service. With
I'm creating an application that is able to generate xml licenses. The application is
I'm creating a map editor for a little game project that I'm doing. Considering
I'm creating a simple license key system to keep honest people honest. I don't
I'm creating a module that would capture the TCP/IP packets from TCP/IP stack and
The company I work for is creating an iOS app that will be skinned
I'm creating a flags enumeration in C#, similar to the following: [Flags] public enum
I've been tasked with creating a tool that can diff and merge the configuration

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.