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

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

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

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

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

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