-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.bat
33 lines (26 loc) · 827 Bytes
/
install.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
@echo off
set module=%1
net session >nul 2>&1
if %errorLevel% EQU 0 (
echo Administrative permissions confirmed.
) else (
echo Failure: Administrative permissions are required
exit /B 1
)
WHERE choco
IF %ERRORLEVEL% NEQ 0 (
ECHO "choco is missed -- install it"
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" & SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
)
SET modules=apps dev fonts windows
IF "%module%" NEQ "" SET modules=%module%
FOR %%m in (%modules%) DO (
IF EXIST %%m\apply.bat (
echo apply module %%m
cd %%m
call apply.bat
cd ..
)
)
echo update choco ...
choco upgrade all