@echo off REM Install works only with ADMIN rights !! net session >nul 2>&1 if %errorLevel% neq 0 ( echo. echo ERROR : You must launch "Install.bat" with ADMIN rights to install KaraFan !! goto End ) set VERSION=3.11 set PYTHON=python-3.11.6-amd64.exe set DOWNLOAD=https://www.python.org/ftp/python/3.11.6/%PYTHON% echo. echo Install Python %VERSION% from https://www.python.org : echo. echo 1. Install or Re-Install echo 2. Python was already installed with this Installer ! echo Q. Quit echo. choice /N /C 12Q /M "Your choice --> " if errorlevel 3 goto End if errorlevel 2 goto Step_2 :Step_1 bitsadmin.exe /transfer "Download Python" %DOWNLOAD% "%~dp0%PYTHON%" if errorlevel 1 ( echo. echo ERROR : Unable to download "%PYTHON%" ! goto End ) cls echo. echo Install Python with correct Parameters !! echo. echo Choose your installation type : echo. echo 1. Easy Install echo 2. Install in a Custom Path echo Q. Quit echo. choice /N /C 12Q /M "Your choice --> " if errorlevel 3 goto End if errorlevel 2 goto Custom if errorlevel 1 goto Easy :Easy "%~dp0%PYTHON%" SimpleInstall=1 SimpleInstallDescription="Python for KaraFan - by Captain FLAM" InstallAllUsers=0 CompileAll=1 PrependPath=1 Include_doc=0 Include_launcher=1 InstallLauncherAllUsers=1 Include_tcltk=0 Include_test=0 goto Step_2 :Custom "%~dp0%PYTHON%" InstallAllUsers=0 CompileAll=1 PrependPath=1 Include_doc=0 Include_launcher=1 InstallLauncherAllUsers=1 Include_tcltk=0 Include_test=0 :Step_2 cls echo. echo Install Microsoft Visual C++ 2015-2022 (x64) - (Needed for PyTorch CUDA) : echo. echo 1. Install or Re-Install echo 2. Visual C++ was already installed with this Installer ! echo Q. Quit echo. choice /N /C 12Q /M "Your choice --> " if errorlevel 3 goto End if errorlevel 2 goto Step_3 bitsadmin.exe /transfer "Download Microsoft Visual C++ 2015-2022 (x64)" https://aka.ms/vs/17/release/vc_redist.x64.exe "%~dp0vc_redist.x64.exe" if errorlevel 1 ( echo. echo ERROR : Unable to download "vc_redist.x64.exe" ! goto End ) "%~dp0vc_redist.x64.exe" /install /quiet /norestart if errorlevel 1 ( echo. echo ERROR : Unable to install "vc_redist.x64.exe" ! goto End ) :Step_3 bitsadmin.exe /transfer "Download the LAST [Setup.py] from GitHub..." https://github.com/Captain-FLAM/KaraFan/wiki/Data/Setup.py "%~dp0Setup.py" if errorlevel 1 ( echo. echo ERROR : Unable to download "Setup.py" ! goto End ) REM Replace owner of Setup.py to Current User takeown /S "%COMPUTERNAME%" /U "%USERNAME%" /F "%~dp0Setup.py" >nul 2>&1 icacls "%~dp0Setup.py" /setowner "%USERNAME%" /T >nul 2>&1 cls echo. echo Well done ! echo Ecosystem is ready to install KaraFan... echo. echo Now, you have to execute "Setup.py" to install KaraFan !! echo (as a Normal User : YOU !) echo. echo Simply double-click on "Setup.py". REM Remove installer files if exist "%~dp0%PYTHON%" del "%~dp0%PYTHON%" >nul if exist "%~dp0vc_redist.x64.exe" del "%~dp0vc_redist.x64.exe" >nul if exist "%~dp0Install.zip" del "%~dp0Install.zip" >nul if exist "%~dp0Install.exe" del "%~dp0Install.exe" >nul :End echo. pause exit