@set @js=1 /*
@echo off & setlocal enabledelayedexpansion
set /p "Name=Name:"
set "Serial="
set "table=2345678901"
for /f "delims=" %%a in ('cscript //nologo //e:jscript "%~f0" %Name%') do %%a
for /l %%i in (0,1,10) do (
set "Name_char=!Name:~%%i,1!"
if "!Name_char!"=="" goto end
set "Name_ascii=!ascii%%i!"
set /a result=^(^(^(Name_ascii %% 10^)^^%%i^)+2^) %% 256
if !result! geq 10 set /a result-=10
call set "Serial=!Serial!%%table:~!result!,1%%"
)
:end
echo Serial:%Serial%
pause
goto :eof
*/
s="set /a ascii=0"
for(i=0;i<WSH.Arguments(0).length;i++)
s=s+",ascii"+i.toString()+"="+WSH.Arguments(0).charCodeAt(i)
WSH.Echo(s)