Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated mset9.bat to Install Python #34

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 34 additions & 12 deletions MSET9_installer_script/mset9.bat
Original file line number Diff line number Diff line change
@@ -1,12 +1,34 @@
@echo off
chcp 65001 > nul
py -V > nul
if %errorlevel% NEQ 0 (
echo Python 3 is not installed.
echo Please install Python 3 and try again.
echo https://www.python.org/downloads/
echo.
pause
exit
)
py -3 mset9.py
@echo off
chcp 65001 > nul

py -V 2> nul
if %errorlevel% EQU 0 py -3 mset9.py
python -V 2> nul
if %errorlevel% EQU 0 python -3 mset9.py else (
J0n-b0 marked this conversation as resolved.
Show resolved Hide resolved
echo Python not found. Do you want to install it? (yes or no)
set /p pyPrompt="> "
set confirm=F

if %PyPrompt% EQU y set confirm=T
if %PyPrompt% EQU yes set confirm=T

if %confirm% EQU T (
cls
echo Downloading...

ver | findstr "6.1" > nul & :: 6.1 = Windows 7
if %errorlevel% EQU 0 (
powershell -Command "(New-Object Net.WebClient).DownloadFile('https://www.python.org/ftp/python/3.8.10/python-3.8.10.exe', 'python.exe')"
) else (
powershell -Command "Invoke-WebRequest https://www.python.org/ftp/python/3.12.2/python-3.12.2-amd64.exe -OutFile python.exe"
)

echo Done & echo Installing...
python.exe /quiet PrependPath=1
del python.exe & echo Done
start cmd /K py %cd%\mset9.py
exit
) else (
exit
)
)