-
Notifications
You must be signed in to change notification settings - Fork 0
/
KURULUMU_BASLAT.bat
132 lines (105 loc) · 3.84 KB
/
KURULUMU_BASLAT.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
@echo off
setlocal EnableDelayedExpansion
::net file to test privileges, 1>NUL redirects output, 2>NUL redirects errors
NET FILE 1>NUL 2>NUL
if '%errorlevel%' == '0' ( goto START ) else ( goto getPrivileges )
:getPrivileges
if '%1'=='ELEV' ( goto START )
set "batchPath=%~f0"
set "batchArgs=ELEV"
::Add quotes to the batch path, if needed
set "script=%0"
set script=%script:"=%
IF '%0'=='!script!' ( GOTO PathQuotesDone )
set "batchPath=""%batchPath%"""
:PathQuotesDone
::Add quotes to the arguments, if needed.
:ArgLoop
IF '%1'=='' ( GOTO EndArgLoop ) else ( GOTO AddArg )
:AddArg
set "arg=%1"
set arg=%arg:"=%
IF '%1'=='!arg!' ( GOTO NoQuotes )
set "batchArgs=%batchArgs% "%1""
GOTO QuotesDone
:NoQuotes
set "batchArgs=%batchArgs% %1"
:QuotesDone
shift
GOTO ArgLoop
:EndArgLoop
::Create and run the vb script to elevate the batch file
echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\OEgetPrivileges.vbs"
echo UAC.ShellExecute "cmd", "/c ""!batchPath! !batchArgs!""", "", "runas", 1 >> "%temp%\OEgetPrivileges.vbs"
"%temp%\OEgetPrivileges.vbs"
exit /B
:START
::Remove the elevation tag and set the correct working directory
IF '%1'=='ELEV' ( shift /1 )
:: .... your code start ....
setlocal
call :setESC
cls
set homedir=%~dp0
:: €alŸmyor>> set batdir="%homedir%kurulumayar"
@echo off & setlocal enableextensions disabledelayedexpansion
::@echo off & setlocal enableextensions disabledelayedexpansion
::for %%P in (%CD%) do set "OriginalDrive=%%~dP"
::if not !OriginalDrive!==%SystemDrive% %SystemDrive%
REM Rest of the original code here
(call;)
title Office KUR
mode con lines=35 cols=50
(set lf=^
%= DO NOT DELETE =%
)
set ^"nl=^^^%lf%%lf%^%lf%%lf%^"
set ^"\n=^^^%lf%%lf%^%lf%%lf%^^"
cls
echo(Se‡iniz...%nl%%\n%
%ESC%[93m1.%ESC%[0m ProPlus %ESC%[7;73m2013%ESC%[0m Retail%nl%%\n%
%ESC%[93m2.%ESC%[0m ProPlus %ESC%[7;73m2013%ESC%[0m Volume%nl%%\n%
%ESC%[93m3.%ESC%[0m ProPlus %ESC%[101;93m2016%ESC%[0m Retail%nl%%\n%
%ESC%[93m4.%ESC%[0m ProPlus %ESC%[101;93m2016%ESC%[0m Volume%nl%%\n%
%ESC%[93m5.%ESC%[0m ProPlus %ESC%[7;73m2019%ESC%[0m Retail%nl%%\n%
%ESC%[93m6.%ESC%[0m ProPlus %ESC%[7;73m2019%ESC%[0m Volume%nl%%\n%
%ESC%[93m7.%ESC%[0m ProPlus %ESC%[101;93m2021%ESC%[0m Retail%nl%%\n%
%ESC%[93m8.%ESC%[0m ProPlus %ESC%[101;93m2021%ESC%[0m Volume%nl%%\n%
%ESC%[93m9.%ESC%[0m ProPlus %ESC%[7;73mO365%ESC%[0m Retail%nl%%\n%
%ESC%[93m10.%ESC%[0m Lisans_Bilgisi_Al%nl%%\n%
%ESC%[93m11.%ESC%[0m Lisans_Sil_ve_Aktif_Et%nl%%\n%
%ESC%[93m12.%ESC%[0m Office-Legal-Activation-Script-Menulu-v1.0%nl%%\n%
%ESC%[93m13.%ESC%[0m Office-IID-CID-Checker-Tool-Online%nl%%\n%
%ESC%[93m0.%ESC%[0m €IK
:readKey
echo ==================================================
echo.
echo.
set /p "opt=%ESC%[93mSe‡iniz?(1,2,3,4,5,6,7,8,9,10,11,0):%ESC%[0m "
if %opt% lss 10 (
set opt | findstr /ix "opt=[0123456789]" >nul || goto readKey
) else if %opt% lss 14 (
set opt | findstr /ix "opt=[0123456789][0123]" >nul || goto readKey
) else (
echo ==================================================
echo B”yle bir se‡enek bulunmamaktadr. Ltfen se‡ene§inizi dzeltin.
goto readKey
)
if %opt% equ 0 goto end
for /f "tokens=1,2 delims=:" %%A in (
^"1:2013retail%nl%2:2013volume%nl%3:2016retail%nl%4:2016volume%nl%5:2019retail%nl%6:2019volume%nl%7:2021retail%nl%8:2021volume%nl%9:365retail%nl%10:legalactivationscriptmenulu%nl%11:checkiid^"
) do if %opt% equ %%A (
::BATCH BAžLANGI€
start "Office Kurulumu BaŸlyor... BU PENCEREY˜ KURULUM B˜TENE KADAR KAPATMAYIN..!" "%homedir%kurulumayar\start%%B.cmd"
)
::BATCH B˜T˜ž
goto end
)
:end
endlocal & goto :EOF
:setESC
for /F "tokens=1,2 delims=#" %%a in ('"prompt #$H#$E# & echo on & for %%b in (1) do rem"') do (
set ESC=%%b
exit /B 0
)
exit /B 0