How to get a unique code from a computer

Mansour_Dalir 2,036 Reputation points
2023-07-15T06:23:48.1266667+00:00

hi

What are the ways to build a license (using personal control)? It occurred to me to get the unique code.

My answer is inside (System.Management Namespace) but I can't do anything with it.

It should be a code that for any reason after reinstalling Windows (the same code will return). thank

Please guide me in implementing this example to get the answer. this :

https://learn.microsoft.com/en-us/windows/win32/cimwin32prov/win32-baseboard

I got to the motherboard code this way, but I need a way to call the library in programming and obtaining motherboard and CPU code ( Get-WmiObject Win32_Processor|Format-List ProcessorId)

Shell ("powershell.exe Get-WmiObject win32_baseboard | Format-List SerialNumber,Manufacturer | Out-File D:\Out.Txt")
Developer technologies | Windows Forms
Developer technologies | VB
0 comments No comments
{count} votes

Accepted answer
  1. Castorix31 90,681 Reputation points
    2023-07-15T09:21:59.53+00:00

1 additional answer

Sort by: Most helpful
  1. Mansour_Dalir 2,036 Reputation points
    2023-07-15T12:47:42.3+00:00
           Imports System.Management
            Dim GetAllInfo As New ManagementObjectSearcher("SELECT * FROM win32_baseboard")'Win32_Processor
            Dim sttInFo As String
            sttInFo = GetAllInfo.Get(0).GetPropertyValue("SerialNumber")'ProcessorId
    
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.