-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvs_installer.bat
607 lines (513 loc) · 19.7 KB
/
vs_installer.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
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
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
@echo off
goto :BatchGotAdmin
:--------------------------------------
:version2012
::en_visual_studio_ultimate_2012_x86_web_installer_2599164.exe
::mu_visual_studio_2012_update_5_x86_6967473
:: DOWNLOAD SETUP
set _DOWNLOAD_SETUP=1
set download_setup_exe="%~dp0\vs_ultimate_2012.exe"
set download_setup_arg=/Layout "%~dp0\vs_ultimate_2012" /NoRestart /Full
set download_setup_recommended_arg=
set download_setup_optional_arg=
set download_fix_arg=
:: DOWNLOAD UPDATE
set _DOWNLOAD_UPDATE=1
set download_update_exe="%~dp0\vs_update.exe"
set download_update_arg=/Layout "%~dp0\vst_update_2012" /NoRestart /Full
:: CERTIFICATE
set _INSTALL_CERTIFICATE=0
set "install_cert_folder="
set install_cert_exe=""
:: CERTUTIL
set _INSTALL_CERTUTIL=0
set "install_certutils_folder="
set install_certutils=""
:: INSTALL SETUP
set _INSTALL_SETUP=1
set install_setup_exe="%~dp0\vs_ultimate_2012\vs_ultimate.exe"
set install_setup_arg=/NoWeb /NoRestart /ProductKey RBCXF-CVBGR-382MK-DFHJ4-C69G8
:: INSTALL UPDATE
set _INSTALL_UPDATE=1
set install_update_exe="%~dp0\vst_update_2012\VS2012.5.exe"
set install_update_arg=/NoWeb /NoRestart
:: INSTALL LANGUAGE
set _INSTALL_LANGUAGE=1
::tr_visual_studio_2012_language_pack_x86_920748.exe
set install_language_setup_exe="%~dp0\vst_language_2012\vs_language_tr.exe"
set install_language_setup_arg=
:: INSTALL HELP
::Microsoft.HelpViewer install
set _INSTALL_HELP=1
set install_help_folder="%~dp0\vst_help_2012"
REM set help_default_path="%ProgramData%\Microsoft\HelpLibrary2\Catalogs\VisualStudio11"
set install_help_reg_key="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Help\v2.0\Catalogs\VisualStudio11"
set install_help_reg_key_64="HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Help\v2.0\Catalogs\VisualStudio11"
:: ACTIVATE
set _ACTIVATE=0
set activate_key=RBCXF-CVBGR-382MK-DFHJ4-C69G8
set activate_storepid="%ProgramFiles%\Microsoft Visual Studio 11.0\Common7\IDE\StorePID.exe"
set activate_storepid_64="%ProgramFiles(x86)%\Microsoft Visual Studio 11.0\Common7\IDE\StorePID.exe"
goto :EOF
:version2013
::en_visual_studio_ultimate_2013_with_update_5_x86_web_installer_6815915.exe
:: DOWNLOAD SETUP
set _DOWNLOAD_SETUP=1
set download_setup_exe="%~dp0\vs_ultimate_2013.exe"
set download_setup_arg=/Layout "%~dp0\vs_ultimate_2013" /NoRestart /Full
set download_setup_recommended_arg=
set download_setup_optional_arg=
set download_fix_arg=
:: DOWNLOAD UPDATE
set _DOWNLOAD_UPDATE=0
set download_update_exe=""
set download_update_arg=
:: CERTIFICATE
set _INSTALL_CERTIFICATE=0
set "install_cert_folder="
set install_cert_exe=""
:: CERTUTIL
set _INSTALL_CERTUTIL=0
set "install_certutils_folder="
set install_certutils=""
:: INSTALL SETUP
set _INSTALL_SETUP=1
set install_setup_exe="%~dp0\vs_ultimate_2013\vs_ultimate.exe"
set install_setup_arg=/NoWeb /NoRestart /ProductKey 87DQC-G8CYR-CRPJ4-QX9K8-RFV2B
:: INSTALL UPDATE
set _INSTALL_UPDATE=0
set install_update_exe=
set install_update_arg=
:: INSTALL LANGUAGE
set _INSTALL_LANGUAGE=0
set install_language_setup_exe=""
set install_language_setup_arg=
:: INSTALL HELP
::Microsoft.HelpViewer install
set _INSTALL_HELP=0
set install_help_folder=""
REM set help_default_path=""
set install_help_reg_key=""
set install_help_reg_key_64=""
:: ACTIVATE
set _ACTIVATE=0
set activate_key=87DQC-G8CYR-CRPJ4-QX9K8-RFV2B 06181
set activate_storepid="%ProgramFiles%\Microsoft Visual Studio 12.0\Common7\IDE\StorePID.exe"
set activate_storepid_64="%ProgramFiles(x86)%\Microsoft Visual Studio 12.0\Common7\IDE\StorePID.exe"
goto :EOF
:version2015
::en_visual_studio_enterprise_2015_with_update_3_x86_x64_web_installer_8922986.exe
:: DOWNLOAD SETUP
set _DOWNLOAD_SETUP=1
set download_setup_exe="%~dp0\vs_enterprise_2015.exe"
set download_setup_arg=/layout "%~dp0\vs_enterprise_2015" /NoRestart /Full
set download_setup_recommended_arg=
set download_setup_optional_arg=
set download_fix_arg=
:: DOWNLOAD UPDATE
set _DOWNLOAD_UPDATE=0
set download_update_exe=""
set download_update_arg=
:: CERTIFICATE
set _INSTALL_CERTIFICATE=0
set "install_cert_folder="
set install_cert_exe=""
:: CERTUTIL
set _INSTALL_CERTUTIL=0
set "install_certutils_folder="
set install_certutils=""
:: INSTALL SETUP
set _INSTALL_SETUP=1
set install_setup_exe="%~dp0\vs_enterprise_2015\vs_enterprise.exe"
set install_setup_arg=/NoWeb /NoRestart /ProductKey HM6NR-QXX7C-DFW2Y-8B82K-WTYJV
:: INSTALL UPDATE
set _INSTALL_UPDATE=0
set install_update_exe=
set install_update_arg=
:: INSTALL LANGUAGE
set _INSTALL_LANGUAGE=0
set install_language_setup_exe=""
set install_language_setup_arg=
:: INSTALL HELP
::Microsoft.HelpViewer install
set _INSTALL_HELP=0
set install_help_folder=""
REM set help_default_path=""
set install_help_reg_key=""
set install_help_reg_key_64=""
:: ACTIVATE
set _ACTIVATE=1
set activate_key=HM6NR-QXX7C-DFW2Y-8B82K-WTYJV 07060
set activate_storepid="%ProgramFiles%\Microsoft Visual Studio 14.0\Common7\IDE\StorePID.exe"
set activate_storepid_64="%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\Common7\IDE\StorePID.exe"
goto :EOF
:version2017
::mu_visual_studio_enterprise_2017_version_15.3_x86_x64_11100063.exe
::--locale tr-TR ::--verify
:: DOWNLOAD SETUP
set _DOWNLOAD_SETUP=1
set download_setup_exe="%~dp0\vs_enterprise_2017.exe"
set download_setup_arg=--layout "%~dp0\vs_enterprise_2017" --wait --all --lang en-US tr-TR
set download_setup_recommended_arg=--includeOptional --includeRecommended
set download_setup_optional_arg=
set download_fix_arg=%download_setup_arg% %download_setup_recommended_arg% %download_setup_optional_arg% --fix
:: DOWNLOAD UPDATE
set _DOWNLOAD_UPDATE=0
set download_update_exe=""
set download_update_arg=
:: CERTIFICATE
set _INSTALL_CERTIFICATE=0
set "install_cert_folder=%~dp0\vs_enterprise_2017\certificates"
set install_cert_exe="%~dp0\certmgr%_OSarch%.exe"
rem set install_certs="manifestSignCertificates.p12;Microsoft Code Signing PCA 2011;LocalMachine CA|manifestSignCertificates.p12;Microsoft Root Certificate Authority;LocalMachine root|manifestCounterSignCertificates.p12;Microsoft Time-Stamp PCA 2010;LocalMachine CA|manifestCounterSignCertificates.p12;Microsoft Root Certificate Authority;LocalMachine root|vs_installer_opc.SignCertificates.p12;Microsoft Code Signing PCA;LocalMachine CA|vs_installer_opc.SignCertificates.p12;Microsoft Root Certificate Authority;LocalMachine root"
rem For Visual Studio 2017 version 15.8 Preview 2 or later:
set install_certs="manifestRootCertificate.cer;Microsoft Root Certificate Authority 2011;LocalMachine root|manifestCounterSignRootCertificate.cer;Microsoft Root Certificate Authority 2010;LocalMachine root|vs_installer_opc.RootCertificate.cer;Microsoft Root Certificate Authority;LocalMachine root"
:: CERTUTIL
set _INSTALL_CERTUTIL=1
set "install_certutils_folder=%~dp0\vs_enterprise_2017\certificates"
set install_certutils="manifestRootCertificate.cer|manifestCounterSignRootCertificate.cer|vs_installer_opc.RootCertificate.cer"
:: INSTALL SETUP
set _INSTALL_SETUP=1
set install_setup_exe="%~dp0\vs_enterprise_2017\vs_setup.exe"
set install_setup_arg=--wait --noWeb --productKey NJVYC-BMHX2-G77MM-4XJMR-6Q8QF
:: INSTALL UPDATE
set _INSTALL_UPDATE=0
set install_update_exe=
set install_update_arg=
:: INSTALL LANGUAGE
set _INSTALL_LANGUAGE=0
set install_language_setup_exe=""
set install_language_setup_arg=
:: INSTALL HELP
::Microsoft.HelpViewer install
set _INSTALL_HELP=1
set install_help_folder="%~dp0\vst_help_2017"
REM set help_default_path="%ProgramData%\Microsoft\HelpLibrary2\Catalogs\VisualStudio15"
set install_help_reg_key="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Help\v2.3\Catalogs\VisualStudio15"
set install_help_reg_key_64="HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Help\v2.3\Catalogs\VisualStudio15"
:: ACTIVATE
set _ACTIVATE=1
set activate_key=NJVYC-BMHX2-G77MM-4XJMR-6Q8QF 08860
set activate_storepid="%ProgramFiles%\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\StorePID.exe"
set activate_storepid_64="%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\StorePID.exe"
goto :EOF
:version2019
::mu_visual_studio_enterprise_2019_x86_x64.exe
::--locale tr-TR ::--verify
:: DOWNLOAD SETUP
set _DOWNLOAD_SETUP=1
set download_setup_exe="%~dp0\vs_enterprise_2019.exe"
set download_setup_arg=--layout "%~dp0\vs_enterprise_2019" --wait --all --lang en-US tr-TR
set download_setup_recommended_arg=--includeOptional --includeRecommended
set download_setup_optional_arg=
set download_fix_arg=%download_setup_arg% %download_setup_recommended_arg% %download_setup_optional_arg% --fix
:: DOWNLOAD UPDATE
set _DOWNLOAD_UPDATE=0
set download_update_exe=""
set download_update_arg=
:: CERTIFICATE
set _INSTALL_CERTIFICATE=0
set "install_cert_folder="
set install_cert_exe=""
rem set install_certs=
rem For Visual Studio 2017 version 15.8 Preview 2 or later:
set install_certs=""
:: CERTUTIL
set _INSTALL_CERTUTIL=1
set "install_certutils_folder=%~dp0\vs_enterprise_2019\certificates"
set install_certutils="manifestRootCertificate.cer|manifestCounterSignRootCertificate.cer|vs_installer_opc.RootCertificate.cer"
:: INSTALL SETUP
set _INSTALL_SETUP=1
set install_setup_exe="%~dp0\vs_enterprise_2019\vs_setup.exe"
set install_setup_arg=--wait --noWeb --productKey BF8Y8-GN2QH-T84XB-QVY3B-RC4DF
:: INSTALL UPDATE
set _INSTALL_UPDATE=0
set install_update_exe=
set install_update_arg=
:: INSTALL LANGUAGE
set _INSTALL_LANGUAGE=0
set install_language_setup_exe=""
set install_language_setup_arg=
:: INSTALL HELP
::Microsoft.HelpViewer install
set _INSTALL_HELP=0
set install_help_folder=""
REM set help_default_path=""
set install_help_reg_key=""
set install_help_reg_key_64=""
:: ACTIVATE
set _ACTIVATE=1
set activate_key=BF8Y8-GN2QH-T84XB-QVY3B-RC4DF 09260
set activate_storepid="%ProgramFiles%\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\StorePID.exe"
set activate_storepid_64="%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\StorePID.exe"
goto :EOF
:version2022
::vs_enterprise__1706402483.1612664202.exe
::--locale tr-TR ::--verify
:: DOWNLOAD SETUP
set _DOWNLOAD_SETUP=1
set download_setup_exe="%~dp0\vs_enterprise_2022.exe"
set download_setup_arg=--layout "%~dp0\vs_enterprise_2022" --wait --all --lang en-US tr-TR
set download_setup_recommended_arg=--includeOptional --includeRecommended
set download_setup_optional_arg=
set download_fix_arg=%download_setup_arg% %download_setup_recommended_arg% %download_setup_optional_arg% --fix
:: DOWNLOAD UPDATE
set _DOWNLOAD_UPDATE=0
set download_update_exe=""
set download_update_arg=
:: CERTIFICATE
set _INSTALL_CERTIFICATE=0
set "install_cert_folder="
set install_cert_exe=""
rem set install_certs=
rem For Visual Studio 2017 version 15.8 Preview 2 or later:
set install_certs=""
:: CERTUTIL
set _INSTALL_CERTUTIL=1
set "install_certutils_folder=%~dp0\vs_enterprise_2022\certificates"
set install_certutils="manifestRootCertificate.cer|manifestCounterSignRootCertificate.cer|vs_installer_opc.RootCertificate.cer"
:: INSTALL SETUP
set _INSTALL_SETUP=1
set install_setup_exe="%~dp0\vs_enterprise_2022\vs_setup.exe"
set install_setup_arg=--wait --noWeb --productKey VHF9H-NXBBB-638P6-6JHCY-88JWH
:: INSTALL UPDATE
set _INSTALL_UPDATE=0
set install_update_exe=
set install_update_arg=
:: INSTALL LANGUAGE
set _INSTALL_LANGUAGE=0
set install_language_setup_exe=""
set install_language_setup_arg=
:: INSTALL HELP
::Microsoft.HelpViewer install
set _INSTALL_HELP=0
set install_help_folder=""
REM set help_default_path=""
set install_help_reg_key=""
set install_help_reg_key_64=""
:: ACTIVATE
set _ACTIVATE=1
set activate_key=VHF9H-NXBBB-638P6-6JHCY-88JWH 09660
set activate_storepid="%ProgramFiles(x86)%\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\StorePID.exe"
set activate_storepid_64="%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\StorePID.exe"
goto :EOF
:--------------------------------------
:start
cls
set "_VERSION="
set /P "_VERSION=Select Visual Studio Version: "
if /I "%_VERSION%" EQU "0" goto :god_exit
if /I "%_VERSION%" EQU "" goto :start
if /I "%_VERSION%" NEQ "2012" if /I "%_VERSION%" NEQ "2013" if /I "%_VERSION%" NEQ "2015" if /I "%_VERSION%" NEQ "2017" if /I "%_VERSION%" NEQ "2019" if /I "%_VERSION%" NEQ "2022" goto :start
title Visual Studio Tool (%_VERSION%)
call :version%_VERSION%
set "isR=Recommended "
set "isO=Optional "
if not defined download_setup_optional_arg set "isR="
if not defined download_setup_optional_arg set "isO="
goto :main_menu
:BatchGotAdmin
set "FOLDER=%~dp0"
echo "" > "%FOLDER%\vs_installer.vbs" && (
set "FOLDER=%~dp0"
) || (
set "FOLDER=%temp%"
)
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
if '%errorlevel%' NEQ '0' (
echo Requesting administrative privileges...
goto :UACPrompt
) else (
goto :gotAdmin
)
:UACPrompt
echo Set UAC = CreateObject^("Shell.Application"^) > "%FOLDER%\vs_installer.vbs"
echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%FOLDER%\vs_installer.vbs"
"%FOLDER%\vs_installer.vbs"
goto :god_exit
:gotAdmin
if exist "%FOLDER%\vs_installer.vbs" del "%FOLDER%\vs_installer.vbs"
pushd "%CD%"
CD /D "%~dp0"
:: -------------- set global variable --------------
setlocal EnableDelayedExpansion
title Visual Studio Tool
mode con: cols=60 lines=15
set /A _menuCount=0
set _menu1=
set _menu2=
set _menu3=
set _menu4=
set _menu5=
set _menu6=
set _menu7=
set _menu8=
set _menu9=
set _menu10=
for /f "tokens=2 delims==" %%G in ('wmic path Win32_Processor get AddressWidth /value') do set "_OSarch=%%G"
:: -------------- set global variable --------------
goto :start
:main_menu
cls
if "%_DOWNLOAD_SETUP%" EQU "1" if not defined _menu1 call :listmenu _menu1
if defined download_setup_optional_arg if not defined _menu2 call :listmenu _menu2
if defined download_fix_arg if not defined _menu3 call :listmenu _menu3
if "%_DOWNLOAD_UPDATE%" EQU "1" if not defined _menu4 call :listmenu _menu4
if "%_INSTALL_CERTIFICATE%" EQU "1" if not defined _menu5 call :listmenu _menu5
if "%_INSTALL_CERTUTIL%" EQU "1" if not defined _menu11 call :listmenu _menu11
if "%_INSTALL_SETUP%" EQU "1" if not defined _menu6 call :listmenu _menu6
if "%_INSTALL_UPDATE%" EQU "1" if not defined _menu7 call :listmenu _menu7
if "%_INSTALL_LANGUAGE%" EQU "1" if not defined _menu8 call :listmenu _menu8
if "%_INSTALL_HELP%" EQU "1" if not defined _menu9 call :listmenu _menu9
if "%_ACTIVATE%" EQU "1" if not defined _menu10 call :listmenu _menu10
if "%_DOWNLOAD_SETUP%" EQU "1" echo [%_menu1%] Download %isR%offline visual studio?
if defined download_setup_optional_arg echo [%_menu2%] Download %isO%offline visual studio?
if defined download_fix_arg echo [%_menu3%] Download Verify/Fix downloaded Visual studio?
if "%_DOWNLOAD_UPDATE%" EQU "1" echo [%_menu4%] Download offline visual studio update?
if "%_INSTALL_CERTIFICATE%" EQU "1" echo [%_menu5%] Setup need offline certificates?
if "%_INSTALL_CERTUTIL%" EQU "1" echo [%_menu11%] Setup need offline certificates?
if "%_INSTALL_SETUP%" EQU "1" echo [%_menu6%] Setup offline Visual studio?
if "%_INSTALL_UPDATE%" EQU "1" echo [%_menu7%] Setup offline visual studio update?
if "%_INSTALL_LANGUAGE%" EQU "1" echo [%_menu8%] Setup offline visual studio language?
if "%_INSTALL_HELP%" EQU "1" echo [%_menu9%] Setup offline visual studio help (HelpViewer need)?
if "%_ACTIVATE%" EQU "1" echo [%_menu10%] Activate visual studio?
echo [0] Exit?
echo.
set "c="
set /P "c=Select: "
if /I "%c%" EQU "0" goto :god_exit
if /I "%c%" EQU "" goto :main_menu
if defined _menu1 if /I "%c%" EQU "%_menu1%" goto :download_recommended
if defined _menu2 if /I "%c%" EQU "%_menu2%" goto :download_optional
if defined _menu3 if /I "%c%" EQU "%_menu3%" goto :download_fix
if defined _menu4 if /I "%c%" EQU "%_menu4%" goto :download_update
if defined _menu5 if /I "%c%" EQU "%_menu5%" goto :install_certificate
if defined _menu11 if /I "%c%" EQU "%_menu11%" goto :install_certutil
if defined _menu6 if /I "%c%" EQU "%_menu6%" goto :install_setup
if defined _menu7 if /I "%c%" EQU "%_menu7%" goto :install_update
if defined _menu8 if /I "%c%" EQU "%_menu8%" goto :install_language
if defined _menu9 if /I "%c%" EQU "%_menu9%" goto :install_help
if defined _menu10 if /I "%c%" EQU "%_menu10%" goto :activate
goto :main_menu
:listmenu
set /A _menuCount=_menuCount+1
set "%1=%_menuCount%"
goto :EOF
:back_menu
echo.
pause
goto :main_menu
:download_recommended
if exist %download_setup_exe% (
call %download_setup_exe% %download_setup_arg% %download_setup_recommended_arg%
goto :back_menu
) else (
goto :main_menu
)
:download_optional
if exist %download_setup_exe% (
call %download_setup_exe% %download_setup_arg% %download_setup_optional_arg%
goto :back_menu
) else (
goto :main_menu
)
:download_update
if exist %download_update_exe% (
call %download_update_exe% %download_update_arg%
goto :back_menu
) else (
goto :main_menu
)
:download_fix
if exist %download_setup_exe% (
call %download_setup_exe% %download_fix_arg%
goto :back_menu
) else (
goto :main_menu
)
:certloop
for /f "tokens=1* delims=|" %%C in (%temp_install_certs%) do (
set temp_install_certs="%%D"
for /f "tokens=1,2,3 delims=;" %%J in ("%%C") do (
if exist "%install_cert_folder%\%%J" call %install_cert_exe% -add "%install_cert_folder%\%%J" -n "%%K" -s -r %%L
rem echo "%%J %%K %%L"
)
if NOT %temp_install_certs%=="" goto :certloop
)
goto :EOF
:install_certificate
if defined install_cert_folder (
if exist "%install_cert_folder%" (
if exist %install_cert_exe% (
set temp_install_certs=%install_certs%
call :certloop
)
)
)
goto :back_menu
:certutilloop
for /f "tokens=1* delims=|" %%C in (%temp_install_certutils%) do (
set temp_install_certutils="%%D"
if exist "%install_certutils_folder%\%%C" call certutil.exe -addstore -f "Root" "%install_certutils_folder%\%%C"
if NOT %temp_install_certutils%=="" goto :certutilloop
)
goto :EOF
:install_certutil
if defined install_certutils_folder (
if exist "%install_certutils_folder%" (
set temp_install_certutils=%install_certutils%
call :certutilloop
)
)
goto :back_menu
:install_setup
if exist %install_setup_exe% (
call %install_setup_exe% %install_setup_arg%
goto :back_menu
) else (
goto :main_menu
)
:install_update
if exist %install_update_exe% (
call %install_update_exe% %install_update_arg%
goto :back_menu
) else (
goto :main_menu
)
:install_language
if exist %install_language_setup_exe% (
call %install_language_setup_exe% %install_language_setup_arg%
goto :back_menu
) else (
goto :main_menu
)
:install_help
if exist %install_help_folder% (
if "%_OSarch%" EQU "64" (
reg add %install_help_reg_key_64% /v LocationPath /t REG_SZ /d %install_help_folder% /f
) else (
reg add %install_help_reg_key% /v LocationPath /t REG_SZ /d %install_help_folder% /f
)
goto :back_menu
) else (
goto :main_menu
)
:activate
set "_VS="
if "%_OSarch%" EQU "64" (
set _VS=%activate_storepid_64%
) else (
set _VS=%activate_storepid%
)
if exist %_VS% (
start "" /b %_VS% %activate_key% && (
echo Visual Studio activated successfully.
) || (
echo Visual Studio activation failed.
)
) else (
echo Visual Studio not installed.
)
goto :back_menu
:god_exit
exit /B