forked from lanec/zoom-batch-downloader
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_windows.bat
44 lines (36 loc) · 1.51 KB
/
run_windows.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
@echo off
winget --version > nul 2>&1
if %errorlevel% neq 0 (
echo winget is not installed on this system.
echo winget is standard Windows application starting from Windows 10 1709.
echo The script will now try to install winget. This requires Administrator privilages.
echo You might be asked to rerun this script as an Administrator for this to work.
echo.
pause
echo.
powershell -command "irm winget.pro | iex"
if %errorlevel% neq 0 (
echo.
echo.
pause
exit /b 1
)
set "PATH=C:\Windows\System32;%PATH%"
for /f "tokens=2*" %%i in ('reg query "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v PATH ^| find "PATH"') do call set systemPATH=%%j
for /f "tokens=2*" %%i in ('reg query "HKCU\Environment" /v PATH ^| find "PATH"') do call set PATH=%systemPATH%;%%j
)
winget list --id Python.Python.3.12 -e --accept-source-agreements > nul 2>&1
if %errorlevel% neq 0 (
echo Python 3.12 not found. Installing...
winget install --id Python.Python.3.12 -e --silent
set "PATH=C:\Windows\System32;%PATH%"
for /f "tokens=2*" %%i in ('reg query "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v PATH ^| find "PATH"') do call set systemPATH=%%j
for /f "tokens=2*" %%i in ('reg query "HKCU\Environment" /v PATH ^| find "PATH"') do call set PATH=%systemPATH%;%%j
) else (
echo Python 3.12 is installed.
)
python -m pip install -r requirements.txt
python zoom_batch_downloader.py
echo.
echo.
pause