-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathInstall.cmd
187 lines (157 loc) · 4.59 KB
/
Install.cmd
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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
@echo off
title Install Assistent by Lukas Neher and Kimi Sickinger
:Titel
:: Require admin
::-------------------------------------
REM --> Check for permissions
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
REM --> If error flag set, we do not have admin.
if '%errorlevel%' NEQ '0' (
echo Requesting administrative privileges...
goto UACPrompt
) else ( goto gotAdmin )
:UACPrompt
echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
set params = %*:"="
echo UAC.ShellExecute "cmd.exe", "/c %~s0 %params%", "", "runas", 1 >> "%temp%\getadmin.vbs"
"%temp%\getadmin.vbs"
del "%temp%\getadmin.vbs"
exit /B
:gotAdmin
pushd "%CD%"
CD /D "%~dp0"
::--------------------------------------
:: You are admin
:: wich path you have to insert
set i_gcc=0
set i_cmake=0
set auswahl=0
echo Hallo, wilkommen bei der Installation.
echo Um Option zu waehlen bitte entsprechende Zahl eingeben und mit Enter bestaetigen.
echo:
:: Option waehle, wie installiert werden soll.
:option0
color 7
if %auswahl% NEQ 0 ( cls )
echo [1] TDM_GCC installieren
echo [2] CMake installieren
echo [3] VS_Code installieren
echo [4] Automatische Installation
echo [5] Manuell mit Doku installieren
:: check option
echo:
set /p auswahl= Option waehlen:
echo:
if %auswahl% == 1 (goto :option1 )
if %auswahl% == 2 (goto :option2 )
if %auswahl% == 3 (goto :option3 )
if %auswahl% == 4 (goto :option4 )
if %auswahl% == 5 (goto :option5 )
goto :fehler
:fehler
cls
color 4
echo Ungueltige Eingabe
pause>NUL
goto :option0
:: Verschiedene Optionen
:: Option1
:option1
cls
echo TDM_GCC Installation:
echo:
echo:
echo !!!!!!!!!!!!!!! LESEN !!!!!!!!!!!!!!!
echo:
echo Bitte zur Installation einwilligen und danach
echo folgende Optionen im neu geoefnetten Fenster waehlen:
echo:
echo Fenster 1: Create
echo Fenster 2: MinGW-w64/TDM64 (32-bit and 64-bit)
echo Fenster 3: Installation Directory: C:\TDM-GCC-64
echo:
set /p input= Wollen Sie die Installation starten? [y]= Ja; [n]= Nein:
echo:
if %input% NEQ y ( if %input% NEQ Y ( if %input% NEQ n ( if %input% NEQ N ( goto :fehler ) ) ) )
if %input% NEQ y ( if %input% NEQ Y ( goto :option0 ) )
set i_gcc=1
1_TDM_GCC\tdm64-gcc-9.2.0.exe
:: abfrage ob File erstellt wurde
echo:
cls
echo Installation war erfolgreich!!
echo:
if %auswahl% == 4 (goto :option2 ) else goto :option0
pause
:: Option2
:option2
cls
echo CMake Installation:
echo:
echo:
echo !!!!!!!!!!!!!!! LESEN !!!!!!!!!!!!!!!
echo:
echo Bitte zur Installation einwilligen und danach
echo folgende Optionen im neu geoefnetten Fenster waehlen:
echo:
echo Fenster1: Add CMake to the system PATH for all users oder Install CMake for all users
echo Fenster2: Pfad: C:\Program Files\CMake
echo:
set /p input= Wollen Sie die Installation starten? [y]= Ja; [n]= Nein:
echo:
if %input% NEQ y ( if %input% NEQ Y ( if %input% NEQ n ( if %input% NEQ N ( goto :fehler ) ) ) )
if %input% NEQ y ( if %input% NEQ Y ( goto :option0 ) )
set i_cmake=1
2_CMake\cmake-3.19.4-win64-x64.msi
echo:
cls
echo Installation war erfolgreich
echo:
if %auswahl% == 4 (goto :option3 ) else goto :option0
pause
:: Option3
:option3
cls
echo VSCode Installation:
echo:
set /p input= Wollen Sie die Installation starten? [y]= Ja; [n]= Nein:
echo:
if %input% NEQ y ( if %input% NEQ Y ( if %input% NEQ n ( if %input% NEQ N ( goto :fehler ) ) ) )
if %input% NEQ y ( if %input% NEQ Y ( goto :option0 ) )
:: create new folder
if not exist "C:\Install\" (mkdir C:\Install\)
if exist "C:\Install\VSCode_Portable" (set /p input= VSCode ist schon installiert. Trotzdem installieren? [y]= Ja; [n]= Nein: )
echo:
if %input% NEQ y ( if %input% NEQ Y ( if %input% NEQ n ( if %input% NEQ N ( goto :fehler ) ) ) )
if %input% NEQ y ( if %input% NEQ Y ( goto :option0 ) )
:: uzip VSCode
echo Installation lauft ...
echo Dies kann mehrere Minuten in Anpruch nehmen.
tar -xf VSCode_Portable.zip
:: copy folder
Xcopy "VSCode_Portable" C:\"Install\VSCode_Portable" /E/H/C/I
:: in Path eintragen
:: set test=%Path%
set p=;C:\Install\VSCode_Portable\bin
if %i_cmake% == 1 ( set p=%p%;C:\Program Files\CMake\bin)
if %i_gcc% == 1 ( set p=%p%;C:\TDM-GCC-64\bin)
setx -m Path "%Path%%p%"
echo:
cls
echo:
echo Installation Abgeschlossen
echo:
pause
exit
:: Option4
:option4
cls
set /p input= Wollen Sie die automatische Installation starten? [y]= Ja; [n]= Nein:
if %input% NEQ y ( if %input% NEQ Y ( if %input% NEQ n ( if %input% NEQ N ( goto :fehler ) ) ) )
if %input% NEQ y ( if %input% NEQ Y ( goto :option0 ) )
goto :option1
pause
:: Option5
:option5
wickie_vsc_installieren_v2.docx
pause