-
Notifications
You must be signed in to change notification settings - Fork 0
/
Обновление корневых сертификатов (Windows 7-8.1).cmd
209 lines (201 loc) · 8.96 KB
/
Обновление корневых сертификатов (Windows 7-8.1).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
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
@echo off
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: ::
:: Ž¡®¢«¥¨¥ ª®à¥¢ëå á¥àâ¨ä¨ª ⮢ ::
:: ::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: ::
:: CertUpd - ᪠ç âì ¨ ãáâ ®¢¨âì ªâã «ìë¥ á¥àâ¨ä¨ª âë ::
:: CertUpd $:\Path\To\Win - ¨â¥£à¨à®¢ âì ãáâ ®¢ªã á¥àâ¨ä¨ª ⮢ ¢ ::
:: offline-Windows ¢ ¯ ¯ª¥ "$:\Path\To\Win" ::
:: CertUpd /offline - ᮧ¤ âì offline-ª®¬¯«¥ªâ ãáâ ®¢ª¨ ::
:: CertUpd /task - ᮧ¤ âì ¥¦¥¬¥áï箥 " § 祮¥ § ¤ ¨¥" ::
:: CertUpd /? - ¢ë§®¢ á¯à ¢ª¨ ::
:: ::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
if "%~1"=="/?" <"%~f0" findstr /bc:"::"& echo/& pause& goto :eof
if /i "%~1"=="/offline" goto inst
if /i "%~dp0"=="%windir%\" (
cd /d %windir%\CertUpd|| goto :eof
call :upd
cd ..
rd /q/s %windir%\CertUpd
call :task
start cmd /c del /q %~f0
goto :eof
)
>nul 2>&1 dism|| (echo/& echo ’ॡãîâáï ¯à ¢ €¤¬¨¨áâà â®à !& echo/& pause& exit /b 1)
if exist %windir%\sysnative\ %windir%\sysnative\cmd /c "%~f0" %*& goto :eof
if /i "%~1" neq "/task" goto inst
:task
<nul set /p "=Scheduling... "
for /f "tokens=1 delims=[]" %%a in ('find /n "###" "%~f0"') do >%tmp%\c.xml <"%~f0" more +%%a
>nul 2>&1 schtasks /create /tn "Ž¡®¢«¥¨¥ ª®à¥¢ëå á¥àâ¨ä¨ª ⮢" /xml %tmp%\c.xml /f&& (echo done.& >nul copy /y "%~f0" %windir%\System32)|| (echo failed!& set exc=1)
del /q %tmp%\c.xml
exit /b %exc%
:inst
set dir=%tmp%\$$_%random%_$$
<nul set /p "=Preparing..... "
>nul 2>&1 (
rd /q/s %dir%& del /f/a/q %dir%& md %dir%
pushd %dir%|| goto err
certutil -decode "%~f0" d&& expand -r d .|| goto err
)
echo done.
<nul set /p "=Installing.... "
>t.vbs echo set x=CreateObject("Microsoft.XMLHTTP") : x.Open "GET", WSh.Arguments(0), False : x.Send : With CreateObject("Adodb.Stream") : .type = 1 : .open : .write x.responseBody : .savetofile WSh.Arguments(1), 2 : End With
for %%i in (authroots updroots roots delroots disallowedcert) do 2>nul (
cscript //nologo t.vbs http://download.windowsupdate.com/msdownload/update/v3/static/trustedr/en/%%i.sst %%i.sst
if not exist %%i.sst goto err
)
if "%~1"=="" call :upd& goto done
if /i "%~1" neq "/offline" goto intg
echo skipped.
<nul set /p "=Offlining... "
2>nul md "%~dp0Offline"& for %%i in (exe sst) do >nul move /y *.%%i "%~dp0Offline"
prompt $S& echo on& 2>nul >"%~dp0Offline\zrun.cmd" (echo cd /d "%%~dp0"& call :upd)& echo off
goto done
:intg
if not exist "%~1\Windows\System32\config\SOFTWARE" goto err
echo skipped.
<nul set /p "=Integrating... "
>nul (
reg load hklm\111 "%~1\Windows\System32\config\SOFTWARE"|| goto err
reg add hklm\111\Microsoft\Windows\CurrentVersion\RunOnce /v CertUpd /t REG_SZ /d "cmd /c %~nx0" /f
reg unload hklm\111
copy /y "%~f0" "%~1\Windows"
xcopy /y *.sst "%~1\Windows\CertUpd\"
copy /y *.exe "%~1\Windows\CertUpd"
)
:done
echo done.
goto quit
:err
echo failed!
set exc=1
:quit
popd
rd /q/s %dir%
exit /b %exc%
:upd
updroots authroots.sst
updroots updroots.sst
updroots -l roots.sst
updroots -d delroots.sst
updroots -l -u disallowedcert.sst
exit /b
-----BEGIN CERTIFICATE-----
TVNDRgAAAAAdDAAAAAAAACwAAAAAAAAAAwEBAAEAAABNQgAASQAAAAEAAxUAGgAA
AAAAAAAAwUANXiAAdXBkcm9vdHMuZXhlAAor7MXMCwAaW4CAjQEQA6AAACJzVzQA
AG8Au/32sptfkAMU0ME8ZNZNF1Ie7Kg7G1RkPdxttwyR57jbvbN7uvN797TLRaMH
nBznkjZk240sbrEpLJRllmWlSwSjKBK00FbW2VgubRCSi5wEaDrQxcsA4nMANCMA
d3UA/Q66smTkwLqag3QBApAS8HwbhqyJ6+wOnayDzVp3u8lbZHTf6lEX0kG7ancu
rC1yWbHSSmQJChkAsuLPImuoIpZAf0/338D9AEAAAIkB3BUDEd/32fOz75nQRWKI
oN+FXdBxhdKW6e/PMMgPqICWFlhcbLE60GD4a1Chm957O/4+2McrucoUTdKLhmOY
PolEylE4JUOEEadGIpg4wnMhJYcQMekjOCFiKUYn6Kunz2U0vf0WOe5caVQP8K9Y
uZ2uIl5WoiOuWbNnFbc0Vr5/ejTeui6sZyflT+ManV64xguWopTFDiqnUGtAafM+
wLYUtZQA27/61y/v9LXrSSiV8rITfdflCq+RJiCYv9WWMg66h99n/L+Nhu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ET3JhWJA7t0ocSg9jEa/uNMwBNYXRy4kreatJ
ikVWeBw0DdsIKR3OEbN6CERZHQHSSWtjtUFeuQXGOOwB4XUvL4YUf2OWcgQcNHdF
PeAuaKrKWklMJLHl6HFER552+xO6vSvWfYdoudZCE/tBsLxsxnxjxVAptNBKFLO8
kfK1gzHKElQ+eQK2G2eC9yFgKvhOakJnkfYASrxWYOOZweKTfQb+O95WZP0ZCCqa
AGCvEJgh5nr2+GpIbuvBK1CKGahmokmpRg3ibrWNYwbZZ00PKeH+ek876vVmdjZH
pbgSsVIHDozNO8rnnse/DzTiKjUPAKK2tKFN+Og=
-----END CERTIFICATE-----
###
<?xml version="1.0" encoding="UTF-16"?>
<Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
<RegistrationInfo>
<Date>2022-01-01T00:00:00</Date>
<Author>Ander_73</Author>
</RegistrationInfo>
<Triggers>
<CalendarTrigger>
<StartBoundary>2022-01-01T06:00:00</StartBoundary>
<Enabled>true</Enabled>
<ScheduleByMonth>
<DaysOfMonth>
<Day>1</Day>
</DaysOfMonth>
<Months>
<January /><February /><March /><April /><May /><June /><July /><August /><September /><October /><November /><December />
</Months>
</ScheduleByMonth>
</CalendarTrigger>
</Triggers>
<Principals>
<Principal id="Author">
<UserId>S-1-5-18</UserId>
<RunLevel>HighestAvailable</RunLevel>
</Principal>
</Principals>
<Settings>
<MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy>
<DisallowStartIfOnBatteries>true</DisallowStartIfOnBatteries>
<StopIfGoingOnBatteries>true</StopIfGoingOnBatteries>
<AllowHardTerminate>true</AllowHardTerminate>
<StartWhenAvailable>true</StartWhenAvailable>
<RunOnlyIfNetworkAvailable>true</RunOnlyIfNetworkAvailable>
<AllowStartOnDemand>true</AllowStartOnDemand>
<Enabled>true</Enabled>
<Hidden>false</Hidden>
<RunOnlyIfIdle>false</RunOnlyIfIdle>
<WakeToRun>false</WakeToRun>
<ExecutionTimeLimit>PT1H</ExecutionTimeLimit>
<Priority>7</Priority>
</Settings>
<Actions Context="Author">
<Exec>
<Command>CertUpd.cmd</Command>
</Exec>
</Actions>
</Task>