-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathSetup.bat
74 lines (66 loc) · 2.32 KB
/
Setup.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
@echo off
Title Download Library...
where python >nul 2>&1
if errorlevel 1 (
echo Error: Python is not added to PATH.
set /p choice=Do you want to add Python to PATH? (Y/N):
if /i "%choice%"=="Y" (
for /f "tokens=2*" %%a in ('reg query "HKCU\Software\Python\PythonCore" /s /v "InstallPath" 2^>nul ^| find "InstallPath"') do (
set PYTHON_PATH=%%b
)
if not defined PYTHON_PATH (
for /f "tokens=2*" %%a in ('reg query "HKLM\Software\Python\PythonCore" /s /v "InstallPath" 2^>nul ^| find "InstallPath"') do (
set PYTHON_PATH=%%b
)
)
if defined PYTHON_PATH (
echo Adding Python to PATH...
setx PATH "%PATH%;%PYTHON_PATH%"
echo Python has been added to PATH. Please restart the script.
) else (
echo Python installation not found. Please reinstall Python and select "Add to PATH".
)
pause
goto :eof
) else (
echo Python is required in PATH to continue.
pause
goto :eof
)
)
for /f "tokens=2 delims= " %%v in ('python --version 2^>nul') do (
for /f "tokens=1,2 delims=." %%i in ("%%v") do (
if %%i lss 3 (
echo Warning: Python version must be >= 3.11.
pause
goto :eof
)
if %%i==3 if %%j lss 11 (
echo Warning: Python version must be >= 3.11.
pause
goto :eof
)
)
)
pip -V >nul 2>&1
if errorlevel 1 (
echo Error: Pip is not installed or not in the PATH.
pause
goto :eof
)
cls
echo Installing required libraries...
set LIBRARIES=setuptools==65.5.0 pip==22.3.1 wheel requests==2.26.0 colorama selenium==4.0.0 discord==2.5.1 pyinstaller qrcode python-http-client charset_normalizer==2.0.10 2captcha-python beautifulsoup4 pyperclip pypiwin32 packaging keyboard colored PyNaCl easygui tasksio colour pillow psutil emoji httpx tqdm websocket Cipher Popen login pipe fore aes loads pystyle pyautogui pyfadecolor
for %%L in (%LIBRARIES%) do (
python -m pip install "%%L" --upgrade --quiet
)
(
echo @echo off
echo Python Menu.py
) > Start.bat
if exist Start.bat (
Start Start.bat
) else (
echo Warning: Start.bat could not be created.
pause
)