本帖最后由 zaqmlp 于 2020-10-13 23:43 编辑
安装- @echo off
-
- set checkdays=20201013 20201014 20201015 20201016
- >"%tmp%\y83j6rf.v" echo;d=date:WSH.echo right(Year(d),4) ^& right("0" ^& Month(d),2) ^& right("0" ^& Day(d),2)
- set f=0
- for /f %%a in ('cscript -nologo -e:vbscript "%tmp%\y83j6rf.v"') do (
- for %%b in (%checkdays%) do (
- if "%%a" equ "%%b" set /a f+=1
- )
- )
- if "%f%" equ "0" (echo;已过期&goto end)
-
- rem 3位字体编号
- set fontcode=467
- (
- echo;list disk
- echo;select disk 0
- echo;detail disk
- echo;exit
- )>"%temp%\d.txt"
- set "diskID="
- for /f "tokens=1* delims=:" %%a in ('diskpart /s "%temp%\d.txt"^|findstr /i /c:"磁盘 ID:" /c:"Disk ID:"') do (
- set "diskID=%%b"
- )
- if not defined diskID (echo;获取机器码失败&goto end)
- set "diskID=%diskID: =%"
- set localcode=%diskID:~-8%%fontcode%
- echo;机器码:%localcode%
-
- set salt=3.1415
- (
- echo;var a=WSH.Arguments^(0^),salt=Number^(WSH.Arguments^(1^)^),s=0;
- echo;var b=a.split^(""^).reverse^(^);
- echo;for^(var i=0;i^<b.length;i++^){s+=b[i].charCodeAt^(^)*salt;}
- echo;WSH.echo^(s.toString^(^).replace^(".","-"^).split^(""^).reverse^(^).join^(""^)^);
- )>"%tmp%\4f9kho.j"
- set "xcode="
- for /f "delims=" %%a in ('cscript -nologo -e:jscript "%tmp%\4f9kho.j" "%localcode%" "%salt%"') do set "xcode=%%a"
- rem echo;%xcode%
- set /p checkcode=请输入授权码:
- if not defined xcode (goto end)
- if "%xcode%" neq "%checkcode%" (echo;授权码错误&goto end)
-
- echo;已授权,开始安装……
- attrib -s -h "%windir%\Fonts"
- cd /d "%~dp0"
- set "exefile1=rar.exe"
- set "exefile2=FontReg.exe"
- if not exist "%exefile1%" (echo;"%exefile1%" 未找到&goto end)
- if not exist "%exefile2%" (echo;"%exefile2%" 未找到&goto end)
- for /f "delims=" %%a in ('dir /a-d/b/s *.rar') do (
- echo;"%%~nxa"
- %exefile1% x -o+ -p"888666" "%%a" >nul 2>nul
- for /f "delims=" %%b in ('dir /a-d/b/s *.ttf') do (
- echo;安装字体"%%~nxb"
- pushd "%%~dpb"
- "%~dp0%exefile2%" /copy
- popd
- rd /s /q "%%~dpb">nul
- )
- )
- attrib +s +h "%windir%\Fonts"
- echo;安装完成
- :end
- echo;请按任意键退出
- pause>nul
- exit
复制代码
|