求个同配置不同机器码方法。

mutouren168 2014-03-23 06:27:27
//获得CPU序列号
public string getCpu()
{
string strCpu = null;
ManagementClass myCpu = new ManagementClass("win32_Processor");
ManagementObjectCollection myCpuConnection = myCpu.GetInstances();
foreach (ManagementObject myObject in myCpuConnection)
{
strCpu = myObject.Properties["Processorid"].Value.ToString();
break;
}
return strCpu;
}
//获得硬盘序列号
public string GetDiskVolumeSerialNumber()
{
ManagementClass mc = new ManagementClass("Win32_NetworkAdapterConfiguration");
ManagementObject disk = new ManagementObject("win32_logicaldisk.deviceid=\"c:\"");
disk.Get();
return disk.GetPropertyValue("VolumeSerialNumber").ToString();
}


上面2种机器码,如果是同一个牌子他们的机器码就是一样的,求得到同配置不同机器码方法
...全文
193 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
devmiao 2014-03-24
  • 打赏
  • 举报
回复
Controversy about privacy issues[edit] The Pentium III was the first x86 CPU to include a unique, retrievable, identification number, called PSN (Processor Serial Number). A Pentium III's PSN can be read by software through the CPUID instruction if this feature has not been disabled through the BIOS. On November 29, 1999, the Science and Technology Options Assessment (STOA) Panel of the European Parliament, following their report on electronic surveillance techniques asked parliamentary committee members to consider legal measures that would "prevent these chips from being installed in the computers of European citizens."[13] Intel eventually removed the PSN feature from Tualatin-based Pentium IIIs, and the feature was not present in Pentium 4 or Pentium M. 参考:http://en.wikipedia.org/wiki/Pentium_III#Controversy_about_privacy_issues
weizhuangwen 2014-03-24
  • 打赏
  • 举报
回复
(MAC+计算机名+CPU序列号)+SHA1=你的机子哈希
devmiao 2014-03-23
  • 打赏
  • 举报
回复
只有Intel Pentium III才有可以区别不同处理器的序列号。除此之外,你没有办法从软件层面区别不同的CPU。 之所以这样是因为很多国家的法律不允许Intel使用序列号,因为这侵犯了隐私,Intel于是被迫放弃了这个功能。
  • 打赏
  • 举报
回复
最简单的方式是你往目标机器的注册码里随机地写一个编码。
MikeCheers 2014-03-23
  • 打赏
  • 举报
回复
取MAC地址

110,499

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧