机器码生成注册机码软件

致力于安全研究 程序开发 QQ群
您的位置 >>
>> C#实现软件注册码
C#实现软件注册码
发表于3年前
| 作者: seay | 分类:
| 孵化于:日 | 文章热度:8,407 次
显示不全请点击全屏阅读
开发软件时,当用到商业用途时,注册码与激活码就显得很重要了。现在的软件破解技术实在在强了,各种国内外大型软件都有注册机制,但同时也不断地被破解。下面发的只是一个常用版本,发出源码被破就更容易了,但我们学习的是技术。当然也为以后自己的软件不会被轻易破解。
第一步。根据卷标,CPU序列号,生成机器码
// 取得设备硬盘的卷标号
public static string GetDiskVolumeSerialNumber()
ManagementClass mc = new ManagementClass(“Win32_NetworkAdapterConfiguration”);
ManagementObject disk = new ManagementObject(“win32_logicaldisk.deviceid=”d:””);
disk.Get();
return disk.GetPropertyValue(“VolumeSerialNumber”).ToString();
//获得CPU的序列号
public static string getCpu()
string strCpu =
ManagementClass myCpu = new ManagementClass(“win32_Processor”);
ManagementObjectCollection myCpuConnection = myCpu.GetInstances();
foreach (ManagementObject myObject in myCpuConnection)
strCpu = myObject.Properties[“Processorid”].Value.ToString();
return strC
//生成机器码
public static string getMNum()
string strNum = getCpu() + GetDiskVolumeSerialNumber();//获得24位Cpu和硬盘序列号
string strMNum = strNum.Substring(0, 24);//从生成的字符串中取出前24个字符做为机器码
return strMN
public static int[] intCode = new int[127];//存储密钥
public static int[] intNumber = new int[25];//存机器码的Ascii值
public static char[] Charcode = new char[25];//存储机器码字
public static void setIntCode()//给数组赋值小于10的数
for (int i = 1; i & intCode.L i++)
intCode[i] = i % 9;
第二步。根据机器码 生成注册码
//生成注册码
public static string getRNum()
setIntCode();//初始化127位数组
for (int i = 1; i & Charcode.L i++)//把机器码存入数组中
Charcode[i] = Convert.ToChar(getMNum().Substring(i &#));
for (int j = 1; j & intNumber.L j++)//把字符的ASCII值存入一个整数组中。
intNumber[j] = intCode[Convert.ToInt32(Charcode[j])] + Convert.ToInt32(Charcode[j]);
string strAsciiName = “”;//用于存储注册码
for (int j = 1; j & intNumber.L j++)
if (intNumber[j] &= 48 && intNumber[j] &= 57)//判断字符ASCII值是否0-9之间
strAsciiName += Convert.ToChar(intNumber[j]).ToString();
else if (intNumber[j] &= 65 && intNumber[j] &= 90)//判断字符ASCII值是否A-Z之间
strAsciiName += Convert.ToChar(intNumber[j]).ToString();
else if (intNumber[j] &= 97 && intNumber[j] &= 122)//判断字符ASCII值是否a-z之间
strAsciiName += Convert.ToChar(intNumber[j]).ToString();
else//判断字符ASCII值不在以上范围内
if (intNumber[j] & 122)//判断字符ASCII值是否大于z
strAsciiName += Convert.ToChar(intNumber[j] – 10).ToString();
strAsciiName += Convert.ToChar(intNumber[j] – 9).ToString();
return strAsciiN
第三步。检查注册状况,若没有注册,可自定义试用
/// &summary&
/// 检查注册
/// &/summary&
private void CheckRegist()
this.btn_reg.Enabled =
RegistryKey retkey = Microsoft.Win32.Registry.CurrentUser.OpenSubKey(“software”, true).CreateSubKey(“wxk”).CreateSubKey(“wxk.INI”);
foreach (string strRNum in retkey.GetSubKeyNames())//判断是否注册
if (strRNum == clsTools.getRNum())
thControl(true);
thControl(false);
Thread th2 = new Thread(new ThreadStart(thCheckRegist2));
th2.Start();
/// &summary&
/// 验证试用次数
/// &/summary&
private static void thCheckRegist2()
MessageBox.Show(“您现在使用的是试用版,该软件可以免费试用3000000次!”, “提示”, MessageBoxButtons.OK, rmation);
tLong = (Int32)Registry.GetValue(“HKEY_LOCAL_MACHINE\SOFTWARE\angel”, “UseTimes”, 0);
MessageBox.Show(“感谢您已使用了” + tLong + “次”, “提示”, MessageBoxButtons.OK, rmation);
Registry.SetValue(“HKEY_LOCAL_MACHINE\SOFTWARE\angel”, “UseTimes”, 0, RegistryValueKind.DWord);
MessageBox.Show(“欢迎新用户使用本软件”, “提示”, MessageBoxButtons.OK, rmation);
tLong = (Int32)Registry.GetValue(“HKEY_LOCAL_MACHINE\SOFTWARE\angel”, “UseTimes”, 0);
if (tLong & 3000000)
int Times = tLong + 1;
Registry.SetValue(“HKEY_LOCAL_MACHINE\SOFTWARE\angel”, “UseTimes”, Times);
MessageBox.Show(“试用次数已到”, “警告”, MessageBoxButtons.OK, MessageBoxIcon.Warning);
Application.Exit();
如果您喜欢我的博客,欢迎点击图片定订阅到邮箱 也可以点击链接
马上分享给你的朋友吧~
博主猜你喜欢
博主向你推荐
评论内容(必填)
&&&&&&&&&&&&&&&&&&&&&&
有人回复时邮件通知我
浏览134,585 次 浏览59,201 次 浏览54,162 次 浏览47,467 次 浏览47,290 次 浏览39,334 次&&下载仅需要3金币
文件大小:0.02MB&&&
贡献者:leohan99&&&
贡献时间:日&&&
&C#根据cpu序列号、磁盘序列号设计软件注册程序,可生成机器码、生成注册码,这种形式的软件注册程序不容易被破解,还是挺实用的
相关标签:
同类热门源码
你可能喜欢
该用户的其它源码
所需金币:
文件大小:0.02MB
您当前剩余金币:0教你生成注册码_百度文库
两大类热门资源免费畅读
续费一年阅读会员,立省24元!
评价文档:
喜欢此文档的还喜欢
教你生成注册码
要​用​心​哦
阅读已结束,如果下载本文需要使用
想免费下载本文?
把文档贴到Blog、BBS或个人站等:
普通尺寸(450*500pix)
较大尺寸(630*500pix)
你可能喜欢[转载]机器码获取生成注册码
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&机器码获取生成注册码&&
通过获取硬盘的物理序列号和网卡MAC地址,为您的程序提供了获取唯一的机器码,你可以根据此码,生成自己产品注册码,有效防止软件的盗版
可以自己根据获取到的硬盘序列号和网卡MAC地址进行一定的加密算法生成,唯一的机器码.
给自己的软件制作注册码
从今天起, 您开发的的任何软件如果您愿意都可以为之加密 --为您的软件制作一款注册机!
当您看完这篇文章时, 您就可以理直气壮的告诉您的用户 : "喂, 想用我的软件是吧 ? 掏钱!".
这当然只是给自己壮胆的话, 现在连万能注册机都有了, 人家还怕啥 ? 不过只要您想想微软, 人家再牛B的加密技术都会被
国人"鄙视"? 但人家不也在中国大把大把的捞钱吗?
OK, 不扯了, 我们进入正题.
同一般的软件注册一样, 我们这里的注册是这样进行的:
1. 首先根据用户的硬件信息生成24位的机器码
-- 相当于种子,用于生成随机数
采用注册机根据特征数字生成一个24位注册码
-- 相当于伪随机数生成器, 输出长度自己定, 最后用一个格式化函数,将随机数映射到ASCII字符集合
用户输入注册码注册成功
假设客户很喜欢您的软件, 也假设他没有破解, 他需要通过以下方式向您取得注册码:
(1).如果他能上网, 他需要把机器码用Email发给您;
(2).如果他不能上网, 他可以把机器码用手机短信的方式发给您.
(3).如果他没有手机, 他可以带着机器码然后坐火车到您的办公室想您要一个注册码.
&& --第3条只是为了让您看帖子的时候别太枯燥了,
现在, 您拿到了客户的机器码后, 如果您同时也收到了他汇的钱, 呵呵, 好像给软件加密就是为了要钱吧?
那么您就可以用客户的机器
码生成一个唯一的注册码再用同样的方式给用户, 最后, 用户输入注册码即可!
需要强调的是客户机器的硬件信息获取方式是有很多种选择的. 这里我们选择最放心的两个硬件: CUP的序列号和硬盘的卷标号.
下面您就可以一步一步制作一款软件注册机了.
步骤一: 获得CUP序列号和硬盘序列号的实现代码如下:
#region 获取cpu的序列号&&
public string
getCpu()&&&&&&&&&&
{&&&&&&&&&&&&&&
string strCpu =
&&&&&&&&&&&&
ManagementClass myCpu = new
ManagementClass("win32_Processor");&&&&&&&&&&&&&&
ManagementObjectCollection myCpuConnection =
myCpu.GetInstances();&&&&&&&&&&&&&&
foreach( ManagementObject myObject in
myCpuConnection)&&&&&&&&&&&&&&
{&&&&&&&&&&&&&&&&&&
myObject.Properties["Processorid"].Value.ToString();&&&&&&&&&&&&&&&&&&
&&&&&&&&&&&&&&
}&&&&&&&&&&&&&
strC&&&&&&&&&&
#endregion
#region 获取cpu的序列号
public string
getCpu()&&&&&&&
{&&&&&&&&&&&
string strCpu =
ManagementClass myCpu = new
ManagementClass("win32_Processor");&&&&&&&&&&&
ManagementObjectCollection myCpuConnection =
myCpu.GetInstances();&&&&&&&&&&&
foreach( ManagementObject myObject in
myCpuConnection)&&&&&&&&&&&
{&&&&&&&&&&&&&&&
myObject.Properties["Processorid"].Value.ToString();&&&&&&&&&&&&&&&
&&&&&&&&&&&
}&&&&&&&&&&
strC&&&&&&&
#endregion
#region 获取设备硬盘的卷标号&&
public string
GetDiskVolumeSerialNumber()&&&&&&&&&&
{&&&&&&&&&&&&&&
ManagementClass mc = new
ManagementClass("Win32_NetworkAdapterConfiguration");&&&&&&&&&&&&&
ManagementObject disk = new
ManagementObject("win32_logicaldisk.deviceid="d:"");&&&&&
disk.Get();&&&&&&&&&&&&&&
disk.GetPropertyValue("VolumeSerialNumber").ToString();&&&&&&&&&&
#endregion
#region 获取设备硬盘的卷标号
public string
GetDiskVolumeSerialNumber()&&&&&&&
{&&&&&&&&&&&
ManagementClass mc = new
ManagementClass("Win32_NetworkAdapterConfiguration");&&&&&&&&&&
ManagementObject disk = new
ManagementObject("win32_logicaldisk.deviceid="d:"");&&
disk.Get();&&&&&&&&&&&
disk.GetPropertyValue("VolumeSerialNumber").ToString();&&&&&&&
#endregion
步骤二: 收集硬件信息生成机器码, 代码如下:
private void button1_Click(object sender, EventArgs
{&&&&&&&&&&&&&&
label2.Text = getCpu() +
GetDiskVolumeSerialNumber();//获得24位Cpu和硬盘序列号&&&&&&&&&&&&&&
string[] strid = new
string[24];&&
for (int i = 0; i & 24;
i++)//把字符赋给数组&&&&&&
{&&&&&&&&&&&&&&&&&&
strid[i] = label2.Text.Substring(i,
1);&&&&&&&&&&&&&&
}&&&&&&&&&&&&&&
label2.Text =
"";&&&&&&&&&&&&&
Random rdid = new
Random();&&&&&&&&&&&&&&
for (int i = 0; i & 24;
i++)//从数组随机抽取24个字符组成新的字符生成机器三&&&&&&&&&&&&&&
{&&&&&&&&&&&&&&&&&&
&&&&&&&&&&
label2.Text += strid[rdid.Next(0,
24)];&&&&&&&&&&&&&&
}&&&&&&&&&&
private void button1_Click(object sender, EventArgs
{&&&&&&&&&&&
label2.Text = getCpu() +
GetDiskVolumeSerialNumber();//获得24位Cpu和硬盘序列号&&&&&&&&&&&
string[] strid = new string[24];
for (int i = 0; i & 24;
i++)//把字符赋给数组&&&
{&&&&&&&&&&&&&&&
strid[i] = label2.Text.Substring(i,
1);&&&&&&&&&&&
}&&&&&&&&&&&
label2.Text =
"";&&&&&&&&&&
Random rdid = new
Random();&&&&&&&&&&&
for (int i = 0; i & 24;
i++)//从数组随机抽取24个字符组成新的字符生成机器三&&&&&&&&&&&
{&&&&&&&&&&&&&&&
&&&&&&&&&&
label2.Text += strid[rdid.Next(0,
24)];&&&&&&&&&&&
步骤三: 使用机器码生成软件注册码, 代码如下:
public int[] intCode = new
int[127];//用于存密钥&&&&&&&&&&
public void
setIntCode()//给数组赋值个小于10的随机数&&&&&&&&&&
{&&&&&&&&&&&&&&
&&& Random ra =
Random();&&&&&&&&&&&&&
&&& for (int i =
1; i & intCode.Li++
)&&&&&&&&&&&
{&&&&&&&&&&&&&&&&&&
intCode[i] = ra.Next(0,
9);&&&&&&&&&&&&&&
}&&&&&&&&&&
}&&&&&&&&&
public int[] intNumber = new
int[25];//用于存机器码的Ascii值&&
public char[] Charcode = new
char[25];//存储机器码字&&&&&&&&&&&&&
//生成注册码&&&&&&&&&&
private void button2_Click(object sender, EventArgs
{&&&&&&&&&&&&&&
(label2.Text !=
"")&&&&&&&&&&&&&&
{&&&&&&&&&&&&&&&&&&
setIntCode();//初始化127位数组&&&&&&&&&&&&&&&&&&
for (int i = 1; i & Charcode.L
i++)//把机器码存入数组中&&&&&&&&&&&&&&&&&&
{&&&&&&&&&&&&&&&&&&&&&&
&&&&&&&&&&&&
Charcode[i] = Convert.ToChar(label2.Text.Substring(i - 1,
1));&&&&&&&&&&&&&&&&&&
}//&&&&&&&&&&&&&&&&&
for (int j = 1; j & intNumber.L
j++)//把字符的ASCII值存入一个整数组中。&&&&&&&&&&&&&&&&&
&&&&&&&&&&
{&&&&&&&&&&&&&&&&&&&&&
&&&&&&&&&&&&
intNumber[j] = intCode[Convert.ToInt32(Charcode[j])] +
Convert.ToInt32(Charcode[j]);&&&&&&
}&&&&&&&&&&&&&&&&&&
string strAsciiName =
//用于存储机器码&&&&&&&&
&&&&&&&&&&&
for (int j = 1; j & intNumber.L
{&&&&&&&&&&&&&&&&&&&&&
&&&&&&&&&&&
//MessageBox.Show((Convert.ToChar(intNumber[j])).ToString());&&&&&&&&&&&&&&&&&&&&&&
&&&&&&&&&&&
if (intNumber[j] &= 48
&& intNumber[j] &=
57)//判断字符ASCII值是否0-9之间&&&&&&&&&&&&&&&&&&&&&&
&&&&&&&&&&&&&
{&&&&&&&&&&&&&&&&&&&&&&&&&
&&&&&&&&&&&&&&&&
strAsciiName +=
Convert.ToChar(intNumber[j]).ToString();&&&&&&&&&&&&&&&&&&&&&&
&&&&&&&&&&&&
}&&&&&&&&&&&&&&&&&&&&&&
&&&&&&&&&&&
else if (intNumber[j] &= 65
&& intNumber[j] &=
90)//判断字符ASCII值是否A-Z之间&&&&&
&&&&&&&&&&&&&&
{&&&&&&&&&&&&&&&&&&&&&&&&&&
&&&&&&&&&&&&&&&&
strAsciiName +=
Convert.ToChar(intNumber[j]).ToString();&&&&&&&&&&&&&&&&&&&&&&
&&&&&&&&&&&&
}&&&&&&&&&&&&&&&&&&&&&
&&&&&&&&&&&&
else if (intNumber[j] &= 97
&& intNumber[j] &=
122)//判断字符ASCII值是否a-z之间&&&&&&&&&&&&&&&&&&&&&&
&&&&&&&&&&&&&&
{&&&&&&&&&&&&&&&&&&&&&&&&&&
&&&&&&&&&&&&&&&&&
strAsciiName +=
Convert.ToChar(intNumber[j]).ToString();&&&&&&&&&&&&&&&&&&&&&&
&&&&&&&&&&&&
}&&&&&&&&&&&&&&&&&&&&&&
&&&&&&&&&&&&
else//判断字符ASCII值不在以上范围内&&&
&&&&&&&&&&&&&&
{&&&&&&&&&&&&&&&&&&&&&&&&&&
&&&&&&&&&&&&&&&&
if (intNumber[j] &
122)//判断字符ASCII值是否大于z&&&&&&&&&&&&&&&&&&&&&&&&&&
&&&&&&&&&&&&&&&&
&&&&&&&&&&&&&&&&&&&&
strAsciiName += Convert.ToChar(intNumber[j] -
10).ToString();&&&
&&&&&&&&&&&&&&&&
}&&&&&&&&&&&&&&&&&&&&&&&&&&
&&&&&&&&&&&&&&&&
else&&&&&&
&&&&&&&&&&&&&&&&
{&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
&&&&&&&&&&&&&&&&&&&&
strAsciiName += Convert.ToChar(intNumber[j] -
9).ToString();&&&&&&&&&&&&&&&&&&&&&&&&&&
&&&&&&&&&&&&&&&&&
}&&&&&&&&&&&&&&&&&&&&&&
&&&&&&&&&&&&&
}&&&&&&&&&&&&&&&&&&&&&&
&&&&&&&&&&&&&
label3.Text =
strAsciiN//得到注册码&&&&&&&&&&&&&&&&&&
&&&&&&&&&&&&
}&&&&&&&&&&&&&
}&&&&&&&&&&&&&&
else&&&&&&&&&&&&&&
{ MessageBox.Show("请选生成机器码","注册提示");
}&&&&&&&&&&
public int[] intCode = new
int[127];//用于存密钥&&&&&&&
public void
setIntCode()//给数组赋值个小于10的随机数&&&&&&&
{&&&&&&&&&&&
&&& Random ra =
Random();&&&&&&&&&&
&&& for (int i =
1; i & intCode.Li++
{&&&&&&&&&&&&&&&
intCode[i] = ra.Next(0,
9);&&&&&&&&&&&
public int[] intNumber = new int[25];//用于存机器码的Ascii值
public char[] Charcode = new
char[25];//存储机器码字&&&&&&&&&&
//生成注册码&&&&&&&
private void button2_Click(object sender, EventArgs
{&&&&&&&&&&&
(label2.Text !=
"")&&&&&&&&&&&
{&&&&&&&&&&&&&&&
setIntCode();//初始化127位数组&&&&&&&&&&&&&&&
for (int i = 1; i & Charcode.L
i++)//把机器码存入数组中&&&&&&&&&&&&&&&
{&&&&&&&&&&&&&&&&&&&
&&&&&&&&&&&&
Charcode[i] = Convert.ToChar(label2.Text.Substring(i - 1,
1));&&&&&&&&&&&&&&&
}//&&&&&&&&&&&&&&
for (int j = 1; j & intNumber.L
j++)//把字符的ASCII值存入一个整数组中。&&&&&&&&&&&&&&
&&&&&&&&&&
{&&&&&&&&&&&&&&&&&&
&&&&&&&&&&&&
intNumber[j] = intCode[Convert.ToInt32(Charcode[j])] +
Convert.ToInt32(Charcode[j]);&&&
}&&&&&&&&&&&&&&&
string strAsciiName =
//用于存储机器码&&&&&
&&&&&&&&&&&
for (int j = 1; j & intNumber.L j++)
{&&&&&&&&&&&&&&&&&&
&&&&&&&&&&&
//MessageBox.Show((Convert.ToChar(intNumber[j])).ToString());&&&&&&&&&&&&&&&&&&&
&&&&&&&&&&&
if (intNumber[j] &= 48
&& intNumber[j] &=
57)//判断字符ASCII值是否0-9之间&&&&&&&&&&&&&&&&&&&
&&&&&&&&&&&&&
{&&&&&&&&&&&&&&&&&&&&&&
&&&&&&&&&&&&&&&&
strAsciiName +=
Convert.ToChar(intNumber[j]).ToString();&&&&&&&&&&&&&&&&&&&
&&&&&&&&&&&&
}&&&&&&&&&&&&&&&&&&&
&&&&&&&&&&&
else if (intNumber[j] &= 65
&& intNumber[j] &=
90)//判断字符ASCII值是否A-Z之间&&
&&&&&&&&&&&&&&
{&&&&&&&&&&&&&&&&&&&&&&&
&&&&&&&&&&&&&&&&
strAsciiName +=
Convert.ToChar(intNumber[j]).ToString();&&&&&&&&&&&&&&&&&&&
&&&&&&&&&&&&
}&&&&&&&&&&&&&&&&&&
&&&&&&&&&&&&
else if (intNumber[j] &= 97
&& intNumber[j] &=
122)//判断字符ASCII值是否a-z之间&&&&&&&&&&&&&&&&&&&
&&&&&&&&&&&&&&
{&&&&&&&&&&&&&&&&&&&&&&&
&&&&&&&&&&&&&&&&&
strAsciiName +=
Convert.ToChar(intNumber[j]).ToString();&&&&&&&&&&&&&&&&&&&
&&&&&&&&&&&&
}&&&&&&&&&&&&&&&&&&&
&&&&&&&&&&&&
else//判断字符ASCII值不在以上范围内
&&&&&&&&&&&&&&
{&&&&&&&&&&&&&&&&&&&&&&&
&&&&&&&&&&&&&&&&
if (intNumber[j] &
122)//判断字符ASCII值是否大于z&&&&&&&&&&&&&&&&&&&&&&&
&&&&&&&&&&&&&&&&
&&&&&&&&&&&&&&&&&&&&
strAsciiName += Convert.ToChar(intNumber[j] - 10).ToString();
&&&&&&&&&&&&&&&&
}&&&&&&&&&&&&&&&&&&&&&&&
&&&&&&&&&&&&&&&&
&&&&&&&&&&&&&&&&
{&&&&&&&&&&&&&&&&&&&&&&&&&&&&
&&&&&&&&&&&&&&&&&&&&
strAsciiName += Convert.ToChar(intNumber[j] -
9).ToString();&&&&&&&&&&&&&&&&&&&&&&&
&&&&&&&&&&&&&&&&&
}&&&&&&&&&&&&&&&&&&&
&&&&&&&&&&&&&
}&&&&&&&&&&&&&&&&&&&
&&&&&&&&&&&&&
label3.Text =
strAsciiN//得到注册码&&&&&&&&&&&&&&&
&&&&&&&&&&&&
}&&&&&&&&&&
}&&&&&&&&&&&
else&&&&&&&&&&&
{ MessageBox.Show("请选生成机器码","注册提示");
步骤四: 用户输入注册码注册软件, 演示代码如下:
private void btnRegist_Click(object sender, EventArgs
{&&&&&&&&&&&&
(label3.Text !=
"")&&&&&&&&&&&&&
{&&&&&&&&&&&&&&&&&&
(textBox1.Text.TrimEnd().Equals(label3.Text.TrimEnd()))&&&&&&&&&&&&&&&&&&
{&&&&&&&&&&&&&&&&&&&&&&
&&&&&&&&&&&&&
Microsoft.Win32.RegistryKey retkey =
Microsoft.Win32.Registry.CurrentUser.&&&&&&&&&&&&&&&&&&&
OpenSubKey
("software",
true).CreateSubKey("ZHY").CreateSubKey("ZHY.INI").&&&&&&&&&&&&&&&&&&&
CreateSubKey(textBox1.Text.TrimEnd
());&&&&&&&&&&&&&&&&&&&
retkey.SetValue("UserName",
"MySoft");&&&&&&&&&&&&&&&&&&&&&&
&&&&&&&&&&&&&
MessageBox.Show("注册成功");&&&&&&&&&&&&&&&&&&
}&&&&&&&&&&&&&&&&&&
else&&&&&&&&&&&&&&&&&&
{&&&&&&&&&&&&&&&&&&&&&&
&&&&&&&&&&&&
MessageBox.Show("注册码输入错误");&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
}&&&&&&&&&&&&&&&&&&&&&&&&&&
}&&&&&&&&&&&&&&
else { MessageBox.Show("请生成注册码","注册提示");
}&&&&&&&&&&&&&&&&&&&
private void btnRegist_Click(object sender, EventArgs e)
{&&&&&&&&&
(label3.Text !=
"")&&&&&&&&&&
{&&&&&&&&&&&&&&&
(textBox1.Text.TrimEnd().Equals(label3.Text.TrimEnd()))&&&&&&&&&&&&&&&
{&&&&&&&&&&&&&&&&&&&
&&&&&&&&&&&&&
Microsoft.Win32.RegistryKey retkey =
Microsoft.Win32.Registry.CurrentUser.&&&&&&&&&&&&&&&&&&&
OpenSubKey
("software",
true).CreateSubKey("ZHY").CreateSubKey("ZHY.INI").&&&&&&&&&&&&&&&&&&&
CreateSubKey(textBox1.Text.TrimEnd
());&&&&&&&&&&&&&&&&&&&
retkey.SetValue("UserName",
"MySoft");&&&&&&&&&&&&&&&&&&&
&&&&&&&&&&&&&
MessageBox.Show("注册成功");&&&&&&&&&&&&&&&
}&&&&&&&&&&&&&&&
else&&&&&&&&&&&&&&&
{&&&&&&&&&&&&&&&&&&&
&&&&&&&&&&&&
MessageBox.Show("注册码输入错误");&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
}&&&&&&&&&&&&&&&&&&&&&&&
}&&&&&&&&&&&
else { MessageBox.Show("请生成注册码","注册提示");
}&&&&&&&&&&&&&&&&
/////////////////////评论//////////////////////////////
我觉得这里有问题:
1、如果我要把软件注册移植到别的电脑上,不是又要重新去申请注册吗?
2、用户体验很有问题,至少我不会为了装一软件而去要注册码的
3、一般的注册码机制,是发布软件的时候生成一个唯一的GUID,然后经过处理后,发送给客户。
客户得到后通过网络注册。而不是客
户自己去提供一个什么机器码
转自:/ziyiFly/archive//1296096.html
为了您的安全,请只打开来源可靠的网址
以上网友发言只代表其个人观点,不代表新浪网的观点或立场。

我要回帖

更多关于 机器码注册机 的文章

 

随机推荐