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
