-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.bat
More file actions
38 lines (32 loc) · 1.17 KB
/
Copy pathsetup.bat
File metadata and controls
38 lines (32 loc) · 1.17 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
@echo off
:: Перезапуск от админа, если не запущен как админ
net session >nul 2>&1
if %errorlevel% neq 0 (
echo Requesting administrator privileges...
powershell -Command "Start-Process '%~f0' -Verb RunAs"
exit /b
)
echo Running as administrator...
if not exist "%~dp0logs" mkdir "%~dp0logs"
if not exist "%~dp0external" mkdir "%~dp0external"
if not exist "%~dp0portables" mkdir "%~dp0portables"
if not exist "%~dp0temp" mkdir "%~dp0temp"
echo Setup started at %DATE% %TIME% > "%~dp0logs\install.log"
echo For configuring windows use Boxstarter (choco install boxstarter)
:: Установка Chocolatey (если надо)
powershell -ExecutionPolicy Bypass -File "%~dp0program_groups\EnsureChoco.ps1"
:: Проверка доступности choco
where choco >nul 2>&1
if %errorlevel% neq 0 (
echo.
echo [WARNING] Chocolatey was just installed, but is not yet available in this session.
echo Please close and re-run this script manually.
echo.
pause
exit /b
)
:: Main installation script
powershell -ExecutionPolicy Bypass -File "%~dp0setup.ps1"
echo.
echo All tasks finished. Press any key to exit...
pause >nul