@echo off
title NEWTECH SHOP - SUPER USB LITE (CLOUD EDITION - ORACLE VPS)
color 0B

"%SystemRoot%\System32\fltmc.exe" >nul 2>&1
if %errorLevel% equ 0 goto :ADMIN_OK
"%SystemRoot%\System32\net.exe" session >nul 2>&1
if %errorLevel% equ 0 goto :ADMIN_OK

echo [*] Dang nang quyen Administrator (UAC) cho NewTech Super USB Lite...
"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -ExecutionPolicy Bypass -Command "try { Start-Process -FilePath '%SystemRoot%\System32\cmd.exe' -ArgumentList '/k \"\"%~f0\"\"' -Verb RunAs -ErrorAction Stop; exit 0 } catch { exit 1 }"
if %errorLevel% equ 0 exit /b

:ADMIN_OK
set "LITE_DIR=C:\NewTech_SuperUSB_Lite"
set "PS_EXE=%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe"
if not exist "%PS_EXE%" set "PS_EXE=powershell.exe"

echo ========================================================================================
echo       NEWTECH SHOP - SUPER USB LITE (KET NOI TRUC TIEP ORACLE VPS CLOUD CDN)
echo ========================================================================================
echo [*] Dang dong bo bo Engine 16 Module tu Server Oracle (tool.newtechshop.vn)...

"%PS_EXE%" -NoProfile -ExecutionPolicy Bypass -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $dir = 'C:\NewTech_SuperUSB_Lite'; New-Item -ItemType Directory -Path $dir -Force | Out-Null; $zip = Join-Path $env:TEMP 'SuperUSB_Lite_Core.zip'; (New-Object System.Net.WebClient).DownloadFile('https://tool.newtechshop.vn/downloads/super_usb/SuperUSB_Lite_Core.zip', $zip); if (Get-Command Expand-Archive -ErrorAction SilentlyContinue) { Expand-Archive -LiteralPath $zip -DestinationPath $dir -Force } else { $sh = New-Object -ComObject Shell.Application; $sh.NameSpace($dir).CopyHere($sh.NameSpace($zip).Items(), 16) } Remove-Item $zip -Force -ErrorAction SilentlyContinue"

if not exist "%LITE_DIR%\Core_Engine\Master-Menu.ps1" (
    echo [!] Khong the tai goi SuperUSB_Lite_Core.zip tu https://tool.newtechshop.vn !
    echo [!] Vui long kiem tra ket noi Internet tren may khach.
    pause
    exit /b 1
)

echo [OK] Dong bo thanh cong! Dang mo Menu Tong Super USB (16 Modules)...
cd /d "%LITE_DIR%"
call "%LITE_DIR%\MENU_TONG_SUPER_USB.bat"
