-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.bat
More file actions
74 lines (61 loc) · 2.64 KB
/
Copy pathrun.bat
File metadata and controls
74 lines (61 loc) · 2.64 KB
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
:: Check if running as Administrator
net session >nul 2>&1
if %errorLevel% neq 0 (
echo Requesting Administrator privileges...
powershell -Command "Start-Process cmd -ArgumentList '/c ""%~f0""' -Verb RunAs"
exit /b
)
:: Detect Windows Version
for /f "tokens=4-5 delims=. " %%a in ('ver') do (
if "%%a.%%b"=="6.1" (
echo Windows 7 detected.
echo Installing python-3.8.5.exe...
"%~dp0windows7\setup\python-3.8.5.exe" /passive InstallAllUsers=1 PrependPath=1 Include_test=0
echo Installation python-3.8.5.exe complete.
echo Upgrading pip and installing the required library...
:: Ensure pip.py exists before execution
if exist "%~dp0pip-w7.py" (
python "%~dp0pip-w7.py"
) else (
echo Warning: pip-w7.py not found. Skipping execution.
)
) else if "%%a.%%b"=="6.3" (
echo Windows 8.1 detected.
echo Installing python-3.11.0-amd64.exe...
"%~dp0windows10\setup\python-3.11.0-amd64.exe" /passive InstallAllUsers=1 PrependPath=1 Include_test=0
echo Installation python-3.11.0-amd64.exe complete.
echo Upgrading pip and installing the required library...
:: Ensure pip.py exists before execution
if exist "%~dp0pip-w10.py" (
python "%~dp0pip-w10.py"
) else (
echo Warning: pip-w10.py not found. Skipping execution.
)
) else if "%%a"=="10" (
echo Windows 10 detected.
echo Installing python-3.11.0-amd64.exe...
"%~dp0windows10\setup\python-3.11.0-amd64.exe" /passive InstallAllUsers=1 PrependPath=1 Include_test=0
echo Installation python-3.11.0-amd64.exe complete.
echo Upgrading pip and installing the required library...
:: Ensure pip.py exists before execution
if exist "%~dp0pip-w10.py" (
python "%~dp0pip-w10.py"
) else (
echo Warning: pip-w10.py not found. Skipping execution.
)
) else (
echo Incompatible Windows version detected. Using Windows 10 installation methods. May not success or incompatible.
echo Installing python-3.11.0-amd64.exe...
"%~dp0windows10\setup\python-3.11.0-amd64.exe" /passive InstallAllUsers=1 PrependPath=1 Include_test=0
echo Installation python-3.11.0-amd64.exe complete.
echo Upgrading pip and installing the required library...
:: Ensure pip.py exists before execution
if exist "%~dp0pip-w10.py" (
python "%~dp0pip-w10.py"
) else (
echo Warning: pip-w10.py not found. Skipping execution.
)
)
)
python "%~dp0start.py"