@echo off
echo ============================================
echo   BizNode Basic Node Installer
echo ============================================
echo.

if not exist "C:\basic" mkdir "C:\basic"

echo Extracting D:\biznode-basic.zip to C:\basic...
powershell -Command "Expand-Archive -Path 'D:\biznode-basic.zip' -DestinationPath 'C:\basic' -Force"

echo.
echo Extracted. Running setup...
echo.

cd /d "C:\basic\biznode"
if exist "C:\basic\biznode\scripts\setup_node.py" (
    python "C:\basic\biznode\scripts\setup_node.py" --unattended
) else (
    copy "D:\setup_node.py" "C:\basic\biznode\scripts\setup_node.py"
    python "C:\basic\biznode\scripts\setup_node.py" --unattended
)

echo.
echo ============================================
echo   Installation complete!
echo   Dashboard: http://localhost:7877
echo ============================================
pause
