@echo off&title 本程序为独立开发，已注册TB知识产权，请勿用于商业！
set "path=%windir%;%windir%\system32;%windir%\system32\wbem;%path%"
cd /d "%~dp0"
set "ban=0"
ver | find "6." > nul && set "ban=6"
ver | find "10." > nul && set "ban=10"

if %ban% lss 6 goto st
set uac=0 & bcdedit >nul 2>nul& if errorlevel 1 set uac=1

if %uac%==0 (goto st) else (goto :error_uac)
:error_uac

%1 %2
mshta vbscript:createobject("shell.application").shellexecute("%~0","goto :st","","runas",1)(window.close)&exit
:st
rem ********* locate where ue installed ****************
set "#a80362ff={a80362ff-0oks-0x9x-05xh-8f78ss6oaxh7}"
set "#2628f7c0={2628f7c0-6l18-zz26-mx52-8w2rf060h1me}"
echo ------------------------------------ Summary ------------------------------------
echo;
echo;  Scanning Installation Records, Please Wait。。。
cd /d "%~dp0"
set "path=%windir%;%windir%\system32;%windir%\system32\wbem;%path%"

set "m_ini_=%#a80362ff:~6,1%%#2628f7c0:~8,1%%#2628f7c0:~27,1%%#2628f7c0:~23,1%%#2628f7c0:~30,1%%#2628f7c0:~34,1%%#2628f7c0:~12,2%"
for /f "tokens=2 delims==." %%z in ('wmic os get localdatetime /value ^| find "="') do set raw_dt=%%z
set ssd=%raw_dt:~,8%
set /a em=%ssd:~,1%+180
set /a ed=%ssd:~,1%"<<"3
set apv=%ssd:~,1% 
set m_ini=%ssd:~,4%%ssd:~1,1%%em%%ssd:~1,2%
set m_half=%ssd:~,4%%ssd:~1,1%%em%%ed%
set "vp=%~n0"

if "%ssd%"=="" set ue_tx1=1-Error
if %ssd% GEQ %m_ini_% (set ue_tx1=1-Error) else (set "ue_tx1=1-Success ")
if "%ue_tx2%"=="2-Error" (cls
 echo ------------------------------------ Summary ------------------------------------
 echo;
 echo;  Run dir："%cd%"
 echo;  Soft dir：Error
 for /f "tokens=1,* delims==" %%i in ('SET ue_tx') do echo;  %%j
 echo;
 echo ---------------注册环境失败！把页面截图给客服看！按任意键退出！------------------
 echo;        -----------------让客服帮你解决 按任意键退出！--------------
pause>nul
exit
) else (set "ue_tx2=2-Success ")
if "%ue_tx1%"=="1-Error" (goto :expired) else (set ue_tx1=1-Success)


reg add "HKCU\SOFTWARE\VanDyke\SecureCRT\License" /f /v "__Pid__" /t REG_SZ /d 06,13
reg add "HKCU\SOFTWARE\VanDyke\SecureCRT\License" /f /v "__Vid__" /t REG_SZ /d 87
reg add "HKCU\SOFTWARE\VanDyke\SecureCRT\License" /f /v "Company" /t REG_SZ /d X-FORCE
reg add "HKCU\SOFTWARE\VanDyke\SecureCRT\License" /f /v "Expiration" /t REG_SZ /d ""
reg add "HKCU\SOFTWARE\VanDyke\SecureCRT\License" /f /v "Is Eval License" /t REG_SZ /d N
reg add "HKCU\SOFTWARE\VanDyke\SecureCRT\License" /f /v "Issue Date" /t REG_SZ /d 12-17-2020
reg add "HKCU\SOFTWARE\VanDyke\SecureCRT\License" /f /v "Key" /t REG_SZ /d "AC97N6 D7YNXH FWB4QS C3JUKS ADTRKT P2CA8U XK8FB1 6UZ2PD"
reg add "HKCU\SOFTWARE\VanDyke\SecureCRT\License" /f /v "Name" /t REG_SZ /d X-FORCE
reg add "HKCU\SOFTWARE\VanDyke\SecureCRT\License" /f /v "Serial Number" /t REG_SZ /d 03-85-091908
reg add "HKCU\SOFTWARE\VanDyke\SecureCRT\License" /f /v "Version" /t REG_SZ /d "8.7.3 (x64 build 2279)"

reg add "HKCU\SOFTWARE\VanDyke\SecureFX\License" /f /v "__Pid__" /t REG_SZ /d 03,13
reg add "HKCU\SOFTWARE\VanDyke\SecureFX\License" /f /v "__Vid__" /t REG_SZ /d 87
reg add "HKCU\SOFTWARE\VanDyke\SecureFX\License" /f /v "Company" /t REG_SZ /d X-FORCE
reg add "HKCU\SOFTWARE\VanDyke\SecureFX\License" /f /v "Expiration" /t REG_SZ /d ""
reg add "HKCU\SOFTWARE\VanDyke\SecureFX\License" /f /v "Is Eval License" /t REG_SZ /d N
reg add "HKCU\SOFTWARE\VanDyke\SecureFX\License" /f /v "Issue Date" /t REG_SZ /d 04-17-2050
reg add "HKCU\SOFTWARE\VanDyke\SecureFX\License" /f /v "Key" /t REG_SZ /d "ADB1SZ TZ8KD1 74PUJ3 6A7F3D AAVBBZ E87USM UQ4TNU NBDGTA"
reg add "HKCU\SOFTWARE\VanDyke\SecureFX\License" /f /v "Name" /t REG_SZ /d X-FORCE
reg add "HKCU\SOFTWARE\VanDyke\SecureFX\License" /f /v "Serial Number" /t REG_SZ /d 13-85-268139
reg add "HKCU\SOFTWARE\VanDyke\SecureFX\License" /f /v "Version" /t REG_SZ /d "8.7.3 (x64 build 2279)"



set tsy1=--------------   激活成功！按任意键退出！  ----
set tsy2=------  打开软件即可使用！  ---

CLS
echo ------------------------------------ Summary ------------------------------------
echo;
echo;  Run dir："%cd%"
for /f "tokens=1,* delims==" %%i in ('SET ue_tx') do echo;  %%j
echo;
 echo -------------%tsy1%-------------------
 echo;        -----------------%tsy2%--------------
pause>nul
exit

:expired
set ue_tx1=1-Error
CLS
echo ------------------------------------ Summary ------------------------------------
echo;
echo;  Run dir："%cd%"
for /f "tokens=1,* delims==" %%i in ('SET ue_tx') do echo;  %%j
echo;
 echo --------------把本页面截图给客服 系统兼容性问题--------------
 echo; -------------- 让客服帮你解决 按任意键退出！--------------
pause>nul
exit
