@ECHO OFF
TITLE 绿化
Md "%WinDir%\System32\test_permissions" 2>NUL||(Echo 请使用右键管理员身份运行&&Pause >NUL&&Exit)
taskkill /f /im Xshell* 2
sc stop "FlexNet Licensing Service"
sc delete "FlexNet Licensing Service"
PUSHD %~DP0
if /i "%PROCESSOR_IDENTIFIER:~0,3%" == "X86" goto x86
if /i "%PROCESSOR_IDENTIFIER:~0,3%" NEQ "X86" goto x64
:x86
md "%CommonProgramFiles%\NetSarang"2
copy /y XshellCore.tlb "%CommonProgramFiles%\NetSarang"
reg add "HKLM\SOFTWARE\NetSarang\Xshell\5" /f /v Path /d "%~dp0\"
reg add "HKLM\SOFTWARE\NetSarang\Xshell\5" /f /v ProductKey /d "160414-116379-999806"
reg add "HKLM\SOFTWARE\NetSarang\Xshell\5" /f /v Company /d "睿派克技术论坛"
reg add "HKLM\SOFTWARE\NetSarang\Xshell\5" /f /v UserName /d "roustar31"
reg add "HKLM\SOFTWARE\NetSarang\Xshell\5" /f /v Version /d "5.0.1326"
reg add "HKLM\SOFTWARE\NetSarang\Xshell\5" /f /v MagicCode /t reg_binary /d "c49933603f8c1595132392dfb0279ca1e007040009"

:x64
copy /y XshellCore.tlb "%CommonProgramFiles(x86)%\NetSarang"
md "%CommonProgramFiles(x86)%\NetSarang"2
reg add "HKLM\SOFTWARE\Wow6432Node\NetSarang\Xshell\5" /f /v Path /d "%~dp0\"
reg add "HKLM\SOFTWARE\Wow6432Node\NetSarang\Xshell\5" /f /v ProductKey /d "160414-116379-999806"
reg add "HKLM\SOFTWARE\Wow6432Node\NetSarang\Xshell\5" /f /v Company /d "睿派克技术论坛"
reg add "HKLM\SOFTWARE\Wow6432Node\NetSarang\Xshell\5" /f /v UserName /d "roustar31"
reg add "HKLM\SOFTWARE\Wow6432Node\NetSarang\Xshell\5" /f /v Version /d "5.0.1326"
reg add "HKLM\SOFTWARE\Wow6432Node\NetSarang\Xshell\5" /f /v MagicCode /t reg_binary /d "c49933603f8c1595132392dfb0279ca1e007040009"


mshta VBScript:Execute("Set a=CreateObject(""WScript.Shell""):Set b=a.CreateShortcut(a.SpecialFolders(""Desktop"") & ""\Xshell.lnk""):b.TargetPath=""%~dp0Xshell.exe"":b.WorkingDirectory=""%~dp0"":b.Save:close")
exit