![]() |
|
||||||||||||||
| | 网站首页 | 软件下载 | 技术文章 | 博瑞商城 | 贵客留言 | | ||
|
||
|
|||||
| 一端关于软件序列好的代码,比较简单,不过有值得借鉴的地方 | |||||
作者:佚名 文章来源:网上收集 点击数: 更新时间:2008-6-23 ![]() |
|||||
|
Dim oWsh Dim strSerial Dim arrSerial Dim strChar Dim idx Dim isummary on error resume next set WshShell = Server.CreateObject("WScript.Shell") strSerial = WshShell.RegRead("HKLM\SOFTWARE\asong\wjdh\ProductId") set WshShell = nothing if len(strSerial)<>23 then IfIsSerial = false exit function end if arrSerial = split(strSerial,"-") if (ubound(arrSerial)-lBound(arrSerial))<>3 then IfIsSerial = false exit function end if isummary = 0 strSerial = arrSerial(0) idx = 1 Do While idx <= 5 strChar = Mid(strSerial, idx, 1) isummary = isummary + (Asc(strChar) * 4) idx = idx + 1 Loop strSerial = arrSerial(1) idx = 1 Do While idx <= 5 strChar = Mid(strSerial, idx, 1) isummary = isummary + Asc(strChar) * 3 idx = idx + 1 Loop strSerial = arrSerial(2) idx = 1 Do While idx <= 5 strChar = Mid(strSerial, idx, 1) isummary = isummary + Asc(strChar) * 2 idx = idx + 1 Loop strSerial = arrSerial(3) idx = 1 Do While idx <= 5 strChar = Mid(strSerial, idx, 1) isummary = isummary + Asc(strChar) idx = idx + 1 Loop If isummary <> 3364 Then IfIsSerial = False Else IfIsSerial = True End If End Function |
|||||
| 文章录入:admin 责任编辑:admin | |||||
| 【发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口】 | |||||
| 最新热点 | 最新推荐 | 相关文章 | ||
| 没有相关文章 |
| 网友评论:(只显示最新10条。评论内容只代表网友观点,与本站立场无关!) |
| | 设为首页 | 加入收藏 | 联系站长 | 友情链接 | 版权申明 | 网站公告 | 管理登录 | | |||
|