2021年3月4日星期四

How alter HWID data with ManagementObjectSearcher?

I wanted to ask how could you possibly change the data of the value "PNPDeviceID" of my GPU.

The following code is an example of how to get the value, but since i am not a C# expert i am reaching out for your help because i have no clue how to possibly edit it.

using System;  using System.Management;    namespace HWID_Generator  {      #region HWID      public static class HWID      {            internal class GPU          {              public static string Get()              {                  string res = "";                  var mbs = new ManagementObjectSearcher("Select * From Win32_VideoController");                  ManagementObjectCollection mbsList = mbs.Get();                  string id = "";                  foreach (ManagementObject mo in mbsList)                  {                      id = mo["PNPDeviceID"].ToString();                      res = id;                  }                  return res;              }          }        }      

没有评论:

发表评论