2025-01-09 04:58:48 +00:00
|
|
|
REM bootstrap.bat - WelsonJS 0.2.7
|
|
|
|
REM Repository: https://github.com/gnh1201/welsonjs
|
|
|
|
|
2021-09-21 11:59:57 +00:00
|
|
|
@echo off
|
|
|
|
pushd %~dp0
|
2024-07-22 19:26:38 +00:00
|
|
|
|
2025-01-09 04:58:48 +00:00
|
|
|
:: Define variables
|
|
|
|
set TOOLKIT_URL=https://ics.catswords.net/welsonjs_toolkit.cab
|
|
|
|
set TOOLKIT_PATH=%TEMP%\welsonjs_toolkit.cab
|
|
|
|
set TOOLKIT_EXTRACT_PATH=%TEMP%
|
|
|
|
set REGASM_PATH=%WINDIR%\Microsoft.NET\Framework\v2.0.50727\RegAsm.exe
|
|
|
|
set TOOLKIT_DLL=%TEMP%\WelsonJS.Toolkit.dll
|
|
|
|
|
|
|
|
echo [*] Initializing WelsonJS pre-configuration...
|
2024-07-22 19:26:38 +00:00
|
|
|
|
2025-01-09 04:58:48 +00:00
|
|
|
:: Register HTA file association
|
|
|
|
echo [*] Configuring HTA file association...
|
2024-07-22 19:26:38 +00:00
|
|
|
reg import app\assets\reg\Default_HTA.reg
|
|
|
|
|
2025-01-09 04:58:48 +00:00
|
|
|
:: Unlock performance limit for MSHTML
|
|
|
|
echo [*] Unlocking MSHTML performance limits...
|
2024-07-22 19:26:38 +00:00
|
|
|
reg add "HKCU\Software\Microsoft\Internet Explorer\Styles" /f
|
|
|
|
reg add "HKCU\Software\Microsoft\Internet Explorer\Styles" /v "MaxScriptStatements" /t REG_DWORD /d 0xFFFFFFFF /f
|
|
|
|
|
2025-01-09 04:58:48 +00:00
|
|
|
:: Check if TOOLKIT_DLL exists
|
|
|
|
if exist "%TOOLKIT_DLL%" (
|
|
|
|
echo [*] Toolkit already exists. Skipping download and extraction.
|
|
|
|
) else (
|
|
|
|
:: Download the latest WelsonJS.Toolkit component
|
|
|
|
echo [*] Downloading the latest WelsonJS.Toolkit component...
|
|
|
|
bitsadmin /transfer toolkit_download /download /priority normal %TOOLKIT_URL% %TOOLKIT_PATH%
|
|
|
|
|
|
|
|
:: Extract the downloaded CAB file
|
|
|
|
echo [*] Extracting WelsonJS.Toolkit component...
|
2025-01-09 05:03:13 +00:00
|
|
|
expand %TOOLKIT_PATH% -F:* %TOOLKIT_EXTRACT_PATH%
|
2025-01-09 04:58:48 +00:00
|
|
|
)
|
2024-07-22 19:26:38 +00:00
|
|
|
|
2025-01-09 04:58:48 +00:00
|
|
|
:: Register the WelsonJS.Toolkit component
|
2024-08-15 08:47:29 +00:00
|
|
|
echo [*] Registering WelsonJS.Toolkit component...
|
2025-01-09 04:58:48 +00:00
|
|
|
%REGASM_PATH% /codebase %TOOLKIT_DLL%
|
2024-07-22 19:26:38 +00:00
|
|
|
|
2025-01-09 04:58:48 +00:00
|
|
|
:: Final step
|
|
|
|
echo [*] Pre-configuration complete. Starting bootstrap script...
|
2021-09-21 11:59:57 +00:00
|
|
|
cscript app.js bootstrap
|