-
Notifications
You must be signed in to change notification settings - Fork 0
/
officeKMS.bat
51 lines (40 loc) · 1.77 KB
/
officeKMS.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
@echo off
set /p var=Please enter your Office installation location (add \ after it):
for /f delims^=^" %%i in ('echo %var%') do set test=%%iospp.vbs
IF EXIST "%test%" (
cscript "%test%" /sethst:kms.srv.crsoo.com
cscript "%test%" /act
for /f "delims=" %%i in ('whoami') do set me=%%i
certutil -f -decode "%0" %temp%\KMSXML.zip > nul
expand %temp%\KMSXML.zip %temp%\KMSXML > nul
echo. >> %temp%\KMSXML
echo ^<Arguments^>"%test%" /act^</Arguments^> >> %temp%\KMSXML
echo ^</Exec^> >> %temp%\KMSXML
echo ^</Actions^> >> %temp%\KMSXML
echo ^</Task^> >> %temp%\KMSXML
schtasks /Create /XML %temp%\KMSXML /tn officeKMS /RU %me% /RP *
del %temp%\KMSXML.zip
del %temp%\KMSXML
) ELSE (
echo 無效目錄
)
goto END
-----BEGIN CERTIFICATE-----
TVNDRgAAAADhAgAAAAAAACwAAAAAAAAAAwEBAAEAAAAAAAAAQwAAAAEAAQAEBwAA
AAAAAAAAIVGggyAAS01TWE1MAPLpwfSWAgQHQ0uFVMtymzAU3Xem/8Cwj4WJmzQe
mYwTpw2Thz0xmWy6UeCCNRESI4k4/H2FsXkY0+7gnvs4OveBr79SZn2CVFTwmT0e
ObYFPBQR5cnMfg1+nY0v7GvPsqzv33BA1Efb17UtE83VzN5onU0RUuEGUqJGKQ2l
UCLWo1CkaEt5JLYKuY4zQY6LUqqRNqnsKq1l4RdIqNKSaJPY57E4AAZaEA2e67jO
mTM5cy8D52p6Pp46P0dXztgd/7jAaOfRBLy++N6fh6c1RuXXoQIaKoEDSZPEvKmV
4pYw4BGRe6hBDLbWROobkZd4cUTMvZw6E4y6Lu3gO07eGUSeljlgdPjr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