Windows Server 2003 のサポート終了後のセキュリティアップデートまとめ

  1. まず、curl を使って一括でダウンロード
  2. 次に、すべての KBを /X オプションで解凍
  3. vfi を使って中身のバージョンを確認して、CSVに出力
  4. EXCELにインポートして整形

5. 関数 『=XLOOKUP(INDIRECT(ADDRESS(1,COLUMN()))&INDIRECT(ADDRESS(ROW(),1)),FileInfo!$A$2:$A$802&FileInfo!$C$2:$C$802,FileInfo!$B$2:$B$802,"",0)』でテーブルに並べ替え
6. 古いバージョンのファイルをマクロで表示

Sub button1_Click()
Cells.Select
With Selection.Font
.ColorIndex = xlAutomatic
End With
With Selection.Interior
.Pattern = xlNone
.PatternTintAndShade = 0
End With
For x = 2 To 9999
Max = 0
maxc = 0
If Cells(1, x).Value = "" Then
maxx = x
Exit For
End If
For y = 2 To 9999
If Cells(y, 1).Value = "" Then
maxy = y
Exit For
End If
tmp = Cells(y, x).Value
a = InStrRev(tmp, ".")
If a > 0 Then
b = InStrRev(tmp, ".", a - 1)
If b > 0 Then
a = b
End If
Z = Val(Mid(tmp, a + 1))
If Max < Z Then Max = Z maxc = 1 ElseIf Max = Z Then maxc = maxc + 1 End If End If Next y For y = 2 To maxy tmp = Cells(y, x).Value a = InStrRev(tmp, ".") If a > 0 Then
b = InStrRev(tmp, ".", a - 1)
If b > 0 Then
a = b
End If
Z = Val(Mid(tmp, a + 1))
If Max = Z Then
If maxc = 1 Then
With Cells(y, x).Font
.Color = -16776961
End With
End If
With Cells(y, x).Interior
.Pattern = xlNone
.PatternTintAndShade = 0
End With
Else
With Cells(y, x).Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 65535
.PatternTintAndShade = 0
End With
With Cells(y, x).Font
.ColorIndex = xlAutomatic
End With
End If
End If
Next y
Next x
For y = 2 To maxy
maxp = 0
maxz = 0
For x = 2 To maxx
If Cells(y, x).Font.ColorIndex <> xlAutomatic And Len(Cells(y, x).Value) > 0 Then maxp = maxp + 1 End If If Cells(y, x).Interior.Pattern <> xlSolid And Cells(y, x).Font.ColorIndex = xlAutomatic And Len(Cells(y, x).Value) > 0 Then maxz = maxz + 1 End If
Next
Cells(y, maxx + 1).Value = maxp
Cells(y, maxx + 2).Value = maxz
Next
End Sub
こんな感じのコードと

Sub button2_Click()
For x = 2 To 9999
If Cells(1, x).Value = "" Then
maxx = x
Exit For
End If
Next
For y = 2 To 9999
If Cells(y, 1).Value = "" Then
maxy = y
Exit For
End If
Next
For y = 2 To maxy
If Cells(y, maxx + 1).Value > 0 Then
With Cells(y, 1).Interior
.Pattern = xlNone
.PatternTintAndShade = 0
End With
Else
With Cells(y, 1).Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 65535
.PatternTintAndShade = 0
End With
End If
Next
End Sub
こんな感じのコード

抽出結果

kb3154070 kb4480088 kb4512787 kb4034775 kb4493324 kb4457188 kb4095527 kb4089453 kb4054179 KB4041088-v2 kb4024323 kb4503063 kb4014582 kb3163225 kb3127218 kb4516665 kb4291391 kb4093254 kb3140709 kb3126587 kb4507582 kb3183431 kb3161949 kb3109560 kb4512612 kb4503530 kb4490501 kb4089082 kb3170455 kb3158991 kb3158993 kb4517066 kb4516878 kb4516565 kb4516544 kb4509419 kb4506621 kb4503249 kb4503085 kb4500481 kb4500331 kb4498965 kb4493790 kb4493341 kb4489493 kb4486468 kb4486465 kb4462935 kb4458318 kb4101477 kb4093255 kb4089175 kb4052303 kb4047211 kb4025497 kb4025218 kb4014652 kb3198510 kb3197835 kb3196718 kb3139914 kb3139398 kb3133043 kb3109103 kb3073893 kb4517635 kb4516545 kb4516543 kb4512127 kb4508401 kb4507826 kb4504677 kb4503534 kb4498707 kb4494059 kb4491443 kb4470118 kb4463103 kb4457163 kb4339291 kb4130957 kb4093256 kb4091756 kb4089694 kb4056942 kb4025398 kb4022747 kb4014794 kb3185911 kb3162343 kb3149090 kb3141083 kb3108371 KB2868626
こんな感じ ・ω・

おすすめ

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です