-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwork-pc.bat
More file actions
150 lines (134 loc) · 4.75 KB
/
Copy pathwork-pc.bat
File metadata and controls
150 lines (134 loc) · 4.75 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
@echo off
cls
title Veroni - Custom package installer -- WORK version
echo =========================================================
echo.
echo \\ // ^|^|
echo \\ // ^|^|
echo \\ // ^|^|
echo \V/ ^|\ ^| ^|^|
echo [] V ^| \^| ^|^| [Work]
echo.
echo =========================================================
echo Author: keatane
echo =========================================================
echo.
echo Welcome to Veroni, the custom automatic package installer
echo.
echo Please, before running the following script, get sure:
echo - to have already launched at least one time the command 'winget update' to accept Terms
echo - to have 'curl' command installed
echo =========================================================
timeout /t 2 >nul
echo.
echo.
echo ^*^*^*^*^*^*^*^*^*^* Process starting ^*^*^*^*^*^*^*^*^*^*
echo.
cd C:\
goto :check_administrative
:ok_administrative
goto :update
:ok_update
:: installation of custom programs
echo ^>^>^>^>^>^>^>^>^>^> Installation of custom packages
echo.
echo -- Installation of Chocolatey package manager ...
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "[System.Net.ServicePointManager]::SecurityProtocol = 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
echo -V DONE, please notice that a new terminal must be open to use 'choco' command
echo -- Installation of Python 3.12.0 ...
curl -O https://www.python.org/ftp/python/3.12.0/python-3.12.0-amd64.exe
set myString=Start-Process -Wait -FilePath .\python-3.12.0-amd64.exe
powershell -Command "& {param([string]$arg); Write-Host 'Argument received: ' $arg}" "%myString%"
python -m pip install --upgrade pip
echo -- Installation of Python must-have libraries ...
pip install numpy pandas matplotlib seaborn scikit-learn pytest coverage virtualenv >nul
echo -V DONE
cd C:\Program files
echo -- Installation of Microsoft VisualStudioCode ...
winget install Microsoft.VisualStudioCode >nul
echo -V DONE
echo -- Installation of Brave Browser ...
winget install Brave.Brave >nul
echo -V DONE
echo -- Installation of Docker Desktop ...
winget install Docker.DockerDesktop >nul
echo -V DONE
echo -- Installation of Git ...
winget install Git.Git >nul
echo -V DONE
echo -- Installation of Notepad^+^+ ...
winget install Notepad^+^+.Notepad^+^+ >nul
echo -V DONE
echo -- Installation of Microsoft Teams ...
winget install Microsoft.Teams >nul
echo -V DONE
echo -- Installation of VMWare Workstation Pro ...
winget install VMware.WorkstationPro >nul
echo -V DONE
echo -- Installation of Wireguard Tunnel ...
winget install WireGuard.WireGuard >nul
echo -V DONE
echo -- Installation of Microsoft OneDrive...
winget install Microsoft.OneDrive >nul
echo -V DONE
echo.
echo ^>^>^>^>^>^>^>^>^>V DONE
echo.
echo ^>^>^>^>^>^>^>^>^>^> It is suggested to reboot your computer, if so this script will exit here.
echo ^>^>^>^>^>^>^>^>^>^> Do you want to reboot your computer now^? [yes][no]
set /p answer=
if %answer% equ yes (
echo ^*^*^*^*^*^*^*^*^*^* Rebooting requested. Rebooting in 10 seconds... ^*^*^*^*^*^*^*^*^*^*
timeout /t 10 >nul
shutdown /r /t 0
) else (
echo ^>^>^>^>^>^>^>^>^>^> No reboot requested.
)
echo.
echo.
echo ^*^*^*^*^*^*^*^*^*^* Process successfully exiting ^*^*^*^*^*^*^*^*^*^*
timeout /t 2 >nul
exit /b 0
:: auxiliary functions
:: to manage exiting after failure
:error_failing
echo ^>^>^>^>^>^>^>^>^>X FAILED
echo.
echo Exiting batch process in 2 seconds
timeout /t 2 >nul
:: exit batch script (forced with error code 1)
exit /b 1
goto :eof
:: checking for updates to current installed packages and programs
:update
echo ^>^>^>^>^>^>^>^>^>^> Checking and updating installed packages
echo.
winget upgrade --all --include-unknown
if not %errorlevel% equ 0 (
echo.
echo -- An error occured during the checking or installation of updates
echo.
goto :error_failing
)
echo -- Please note that some applications version can't be determined and can't be automatically installed
echo.
echo ^>^>^>^>^>^>^>^>^>V DONE
echo.
echo.
goto :ok_update
:: checking if process has started with administrative privileges
:check_administrative
echo ^>^>^>^>^>^>^>^>^>^> Checking administrative privileges
>nul 2>&1 net session
if not %errorlevel% equ 0 (
echo.
echo -- The process is not running with administrative privileges. Those are needed to install certain applications.
echo -- Please reload the application with administrative privileges.
echo.
goto :error_failing
)
echo ^>^>^>^>^>^>^>^>^>V DONE
echo.
echo.
goto :ok_administrative
:eof