Simplifying updates for Windows 7 (KB3125574)インストールまとめ
2016/08/05 追記:
久しぶりにWindows 7の仮想環境を起動しましたが、またWindows Updateに時間がかかるようになっていました。
例のごとく、こちらのサイトにお世話になりました。ありがとうございます。
Windows Updateに時間がかかる問題の解消方法2016年7月版
いろいろごちゃごちゃしたので整理します。
前提条件
ホスト環境
- OS: Windows 7 Professional x64 (OEM)
- メモリ: 16GB
- HDD#0: C: OS, D: Data
- DVD/CD Drive: E:
使用ソフト
VirtualBox (仮想化ソフト)
Windows ADK for Windows 10 (DISM)
Windows Management Framework 4.0 or 5.0 (PowerShell)
Download Windows Management Framework 4.0 from Official Microsoft Download Center
Download Windows Management Framework 5.0 from Official Microsoft Download Center
Microsoft Baseline Security Analyzer 2.3
VHD Attach (VHDのAttach/Detach)
Medo's Home Page – Enough research will tend to support your theory.
DAEMON Tools Lite (ISOのマウント/VHDはNG)
DAEMON Tools - 全て必要な機能を持っている最高のイメージングソフトウェア - DAEMON-Tools.cc
McAfee VirusScan Enterprise 8.8.0 Path 5以上 (Patch 4はOfflineインストール不可)
アクセス保護もオフにする
ゲスト環境
KB3125574の入手
-
ActiveXに依存しているので、他のブラウザでは利用できない
KB3020369の入手
インストール
基本は以下を参照。
以下、x64の場合での変更点です。
変更点1
Setup起動前に、念のためスナップショットを作成してから、MBSAのリストの更新を入れておく。
スマホ版: KB3125574を試してみました -その3- インストール後の状態チェック (2ページ目)
こちらで紹介されている、Windows Updateの更新確認が延々と終わらずにエラーになる不具合を回避するKB3145739/KB3153199もインストールされる。
以下からセットアップ後にスキャンしたMBSAのリスト(x64)をダウンロード
BlogSamples/Update1.xml at master · tmori3y2/BlogSamples · GitHub
PowerShellを管理者権限で起動
パスは自分の環境に合わせてください。
$updateXml = "D:\Update\x64\Update1.xml" $additional = "D:\Update\x64\Additionals" md $additional [xml]$xml = get-Content -Path $updateXml $xnavi = $xml.CreateNavigator() $xnavi.Select("//UpdateData[@IsInstalled='false']//DownloadURL") | foreach-Object {Invoke-WebRequest -Uri "$_" -OutFile (Join-Path $additional (Split-Path $_ -Leaf))} $snapshot = <スナップショットの.vhdファイルパス> $offlineDir = "D:\offline" Mount-WindowsImage -ImagePath $snapshot -Index 1 -Path $offlineDir Add-WindowsPackage -Path $offlineDir -PackagePath $additional -IgnoreCheck $sp1 = "D:\Update\x64\Additionals\windows6.1-kb2534366-x64_5980a7fb7334286399bf352ce370acd47b04ffb4.cab" Add-WindowsPackage -Path $offlineDir -PackagePath $sp1 -IgnoreCheck Dismount-WindowsImage -Path $offlineDir -Save
変更点2
- Windows Update Agentの更新は最新版ではなくMBSAものを使用
- Windowsセットアップ完了後に手動でインストール (再起動必須)
Windows 10へのUpgradeへの誘導が含まれる最近のWUAは避ける。
変更点3
- ネットワークの設定が終わったら、Windows Updateの更新の確認を行ってもよい。
- Internet Explorerのセットアップや.NET 4.5.2/4.6.1などの大物からインストールすると良い
KB976932は.cabファイルの一括インストールで失敗したので、個別に入れていますが、適用できていません。他の方の検証にもあるように、何度か更新しないと消えないようです。
KB3138612など、Windows 10へのUpdate誘導関係の更新がリストにあるので、入れたくない人は注意してください。
詳細は、以下に詳しく書かれています。
KB3125574をインストールした後でインストールされるKBリスト
やる気のある方は、上記の画像や、参照リンクの画像から、スクリプトを起こして、Setup開始前にOfflineでの追加インストールに挑戦してみても良いのではないでしょうか・・・
x86は、暇が出来たらそのうちリスト化します。 やりたい方は、基本手順は同じなので、チャレンジしてみてください。
2016/05/20 追記
- 一見、成功しているが、毎回、Failed to unload offline registryが出ている。McAfeeのアクセス保護とオンアクセススキャンの有無で結果は変わらなかった (なお、同じメッセージはWindows 10のVHDに.NET 3.5.1をOfflineオフラインインストールしたときにも出ている。VHDへの展開では無視しても問題がないのだろうか?)
2016-05-20 13:39:12, Info CBS Unloading offline registry hive: {bf1a281b-ad7b-4476-ac95-f47682990ce7}D:/offline/Windows/System32/config/SOFTWARE 2016-05-20 13:39:14, Info CBS Failed to unload offline registry: {bf1a281b-ad7b-4476-ac95-f47682990ce7}D:/offline/Windows/System32/config/SOFTWARE, the client may still need it open. [HRESULT = 0x80070005 - E_ACCESSDENIED] 2016-05-20 13:39:14, Info CBS Unloading offline registry hive: {bf1a281b-ad7b-4476-ac95-f47682990ce7}D:/offline/Windows/System32/config/SYSTEM 2016-05-20 13:39:14, Info CBS Failed to unload offline registry: {bf1a281b-ad7b-4476-ac95-f47682990ce7}D:/offline/Windows/System32/config/SYSTEM, the client may still need it open. [HRESULT = 0x80070005 - E_ACCESSDENIED] 2016-05-20 13:39:14, Info CBS Unloading offline registry hive: {bf1a281b-ad7b-4476-ac95-f47682990ce7}D:/offline/Windows/System32/config/SECURITY 2016-05-20 13:39:14, Info CBS Failed to unload offline registry: {bf1a281b-ad7b-4476-ac95-f47682990ce7}D:/offline/Windows/System32/config/SECURITY, the client may still need it open. [HRESULT = 0x80070005 - E_ACCESSDENIED] 2016-05-20 13:39:14, Info CBS Unloading offline registry hive: {bf1a281b-ad7b-4476-ac95-f47682990ce7}D:/offline/Windows/System32/config/SAM 2016-05-20 13:39:14, Info CBS Failed to unload offline registry: {bf1a281b-ad7b-4476-ac95-f47682990ce7}D:/offline/Windows/System32/config/SAM, the client may still need it open. [HRESULT = 0x80070005 - E_ACCESSDENIED] 2016-05-20 13:39:14, Info CBS Unloading offline registry hive: {bf1a281b-ad7b-4476-ac95-f47682990ce7}D:/offline/Windows/System32/config/COMPONENTS 2016-05-20 13:39:14, Info CBS Failed to unload offline registry: {bf1a281b-ad7b-4476-ac95-f47682990ce7}D:/offline/Windows/System32/config/COMPONENTS, the client may still need it open. [HRESULT = 0x80070005 - E_ACCESSDENIED] 2016-05-20 13:39:14, Info CBS Unloading offline registry hive: {bf1a281b-ad7b-4476-ac95-f47682990ce7}D:/offline/Windows/System32/config/DEFAULT 2016-05-20 13:39:14, Info CBS Failed to unload offline registry: {bf1a281b-ad7b-4476-ac95-f47682990ce7}D:/offline/Windows/System32/config/DEFAULT, the client may still need it open. [HRESULT = 0x80070005 - E_ACCESSDENIED] 2016-05-20 13:39:14, Info CBS Unloading offline registry hive: {bf1a281b-ad7b-4476-ac95-f47682990ce7}D:/offline/Users/default/ntuser.dat 2016-05-20 13:39:14, Info CBS Failed to unload offline registry: {bf1a281b-ad7b-4476-ac95-f47682990ce7}D:/offline/Users/default/ntuser.dat, the client may still need it open. [HRESULT = 0x80070005 - E_ACCESSDENIED]
- OS Edition/SP Level/32 or 64bitはホストOSとオフラインイメージで一致していないと、上手くいかないケースが多いらしい。
- wimをオフラインで処理するときは、KB3020369をコミットしないとKB3125574をインストールできなかったという情報あり
DISM Error when trying to apply the new KB3125574 to install.wim
- Technet Forum (KB3125574)
.wimをカスタマイズしてからVHDに展開するほうが良いのだろうか?
2016/05/30 追記
wimで試しました。
- Offline registory hiveの問題は相変わらず
- Unmountでエラーが出るのはCommit-Wimで回避
- Explorerを開くとエラーになりやすい
wimだとCommitでインストール済みでマークされるのか、VHDだとMBSAのUpdateでインストールされないものがあったが、それが無くなった。勘違い。KB976932はオンラインインストールが必要な更新が含まれているので、オンラインで更新しないと消えない。- VHD/wim共にSetup後に.NET Runtime Optimazation Warning ID1130がイベントログに記録されている
- ちなみにPATHの先頭の方にADKのフォルダを入れておかないと、PoweShellで古いDismが呼ばれてコマンドが無いとか出る