欢迎光临
我们一直在努力

一端关于软件序列好的代码,比较简单,不过有值得借鉴的地方

建站超值云服务器,限时71元/月

function ifisserial()

    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

赞(0)
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com 特别注意:本站所有转载文章言论不代表本站观点! 本站所提供的图片等素材,版权归原作者所有,如需使用,请与原作者联系。未经允许不得转载:IDC资讯中心 » 一端关于软件序列好的代码,比较简单,不过有值得借鉴的地方
分享到: 更多 (0)