いままでほったらかしにしていたエラー「80070005」

WSUSが動いているから、困っていなかった。
Vistaは「80070005」ってのがコンパネのWindows Updateに表示された。
 
検索してみる

Windows Vista に対するドライバ パッケージの互換性
これらのエラーは、Setupapi.dev.log ファイルのエントリによって識別できます。

80070005: ERROR_ACCESS_DENIED 解決方法 : ドライバ パッケージで、パスとすべてのファイルに対して ACL が適切に設定されていることを確認します。

なんじゃこりゃ?

%systemroot%\Windows\inf\setupapi.app.logをじっくりと眺めると「[Exit status: FAILURE(9xe0000101)]」が出てくるけど対象が多すぎて特定に至らず。

「80070005」で検索すると他の情報が多すぎ。Windows Updateで問題が起きている点に着目する。

見つけた対策がこれ

The error code 80070005 usually means that you do not have enough permission to install updates.
 
First please confirm you have logged on an account with administrative privileges.
 
If the issue still occurs, lets’ try the following method to reset the permissions:
 
1. Please download the subinacl.msi file from the following link and save the installation patch onto the Desktop:
 
http://www.microsoft.com/downloads/details.aspx?FamilyID=e8ba3e56-d8fe-4a91-93cf-ed6985e3927b&displaylang=en#AffinityDownloads
 
2. Please go to the Desktop and double click the downloaded file.
3. Please select the C:\Windows\System32 folder as the Destination Folder during the installation. Later we will use this tool to reset the permission settings on the current machine.
 
Note: If the UAC (User Account Control) window is prompted for permission to continue, please click Continue.
 
4. Click Start, in the Start Search bar, type: "notepad" (without quotes) and press Enter.
5. Copy the following commands and then paste them into the open Notepad window:
 
@echo off
 
subinacl /subkeyreg HKEY_LOCAL_MACHINE /grant=administrators=f
subinacl /subkeyreg HKEY_CURRENT_USER /grant=administrators=f
subinacl /subkeyreg HKEY_CLASSES_ROOT /grant=administrators=f
subinacl /subdirectories %SystemDrive% /grant=administrators=f
 
subinacl /subkeyreg HKEY_LOCAL_MACHINE /grant=system=f
subinacl /subkeyreg HKEY_CURRENT_USER /grant=system=f
subinacl /subkeyreg HKEY_CLASSES_ROOT /grant=system=f
subinacl /subdirectories %SystemDrive% /grant=system=f
 
@Echo =========================
@Echo Finished.
@Echo =========================
@pause
 
6. After pasting the above commands, please close the Notepad window. Choose Save when you are prompted to save the file. Type "reset.bat" as the file name and choose Desktop from the left panel as the save location.
7. Refer to the Desktop and right click the reset.bat file, and then choose "Run as administrator."
8. You will see a DOS-like window processing.
 
Note: It may take several minutes. Please be patient. When it is completed, you will be prompted with the message: "Finished, press any key to continue".
 
Try to install the updates again.
 
This issue can be also caused by third-party security programs such as firewalls and anti-virus software. You can disable or remove them to check the issue.
 
If the issue persists, please let me know which updates cannot be installed. Please let me know their names and IDs.
 
Hope it helps.
 
I look forward to your reply.
 
Best regards,
Tim Quan
Microsoft Online Community Support

んーっと考え中・・・

やっぱり作業に伴う部分だけ適当な日本語にしながらやってみる。

1.[http://www.microsoft.com/downloads/details.aspx?FamilyID=e8ba3e56-d8fe-4a91-93cf-ed6985e3927b&displaylang=en#AffinityDownloads:title=SubInACL (SubInACL.exe)]をデスクトップ(とかテキトーなところ)にダウンロードする

2.ダウンロードしたファイル(subinacl.msi)をダブルクリックする

3.「C:\Windows\System32」の配下にインストールしてね。(ここは敢えてProgram Files¥Windows Resource Kits¥Tools¥にしてみる)

注意:「ユーザーアカウントの制御」が表示されたら「続行」ボタンを押す

4.スタートから「検索の開始」に「notepad」と入力してEnterを押すと「メモ帳」が起動する(違うやり方でも全然構わない)

5.次のコマンドをコピーしてメモ帳に貼り付ける

>>
@echo off
 
subinacl /subkeyreg HKEY_LOCAL_MACHINE /grant=administrators=f
subinacl /subkeyreg HKEY_CURRENT_USER /grant=administrators=f
subinacl /subkeyreg HKEY_CLASSES_ROOT /grant=administrators=f
subinacl /subdirectories %SystemDrive% /grant=administrators=f
 
subinacl /subkeyreg HKEY_LOCAL_MACHINE /grant=system=f
subinacl /subkeyreg HKEY_CURRENT_USER /grant=system=f
subinacl /subkeyreg HKEY_CLASSES_ROOT /grant=system=f
subinacl /subdirectories %SystemDrive% /grant=system=f
 
@Echo =========================
@Echo Finished.
@Echo =========================
@pause
<<

6.コマンドを貼り付けたらメモ帳を閉じる。そのときに「reset.bat」と名前を付けてデスクトップに保存する。

7.デスクトップの「reset.bat」を右クリックして「管理者として実行」を選択する

その通りにしたが

「'subinacl' は、内部コマンドまたは外部コマンドとして操作可能なプログラムまたはバッチファイルコマンドとして認識されていません。

Program Filesでは駄目だったのでSystem32に入れ直しても同じものが出た。

インストールフォルダ(c:\windows\system32\Windows Resource Kits\Tools\)に「reset.bat」を移動して「7ばん」を実行してみると同じエラーになった。

悔しいので、「reset.bat」の「subinacl」を「subinacl.exe」に書き換えるが同じエラーになる。
うーん・・・

ちょっと改造する。

@echo off

cd c:\Windows\System32\Windows Resource Kits\Tools
subinacl /subkeyreg HKEY_LOCAL_MACHINE /grant=administrators=f
subinacl /subkeyreg HKEY_CURRENT_USER /grant=administrators=f
subinacl /subkeyreg HKEY_CLASSES_ROOT /grant=administrators=f
subinacl /subdirectories %SystemDrive% /grant=administrators=f

subinacl /subkeyreg HKEY_LOCAL_MACHINE /grant=system=f
subinacl /subkeyreg HKEY_CURRENT_USER /grant=system=f
subinacl /subkeyreg HKEY_CLASSES_ROOT /grant=system=f
subinacl /subdirectories %SystemDrive% /grant=system=f

@Echo =========================
@Echo Finished.
@Echo =========================
@pause

ちくしょう。こんなことをするんだったらインストールフォルダはProgram Filesでもよかったし、reset.batもデスクトップでよかった。

8.始まるとMatrix並にコマンドが流れて、赤茶色のステータス画面が動いている。そんな感じを繰り返す。

注意:時間掛かります。終わったら「継続するには何かキーを押してください...(Finished, press any key to continue)」って表示されるので何かキーを押す

※最後の方のサードパーティ製ソフトがうんちゃらかんちゃらはよく判らなかった

再起動しろとは書いていないので、そのままWUやってみると「80070005」がでた。
 
 
 
gpedit.mscでイントラのWSUSサーバを指定しているのが原因のような気がしてきた。
指定解除して更新を確認すると・・・長い時間を掛けてチェックしている。
そして「80072EFD」がでた。

Windows Update エラー 80072efd
Windows ファイアウォールを使っているのに例外サイトを追加するなんて・・・
IEの「信頼済みサイト」にリンク先の3つを追加したら「80070005」が表示された。無限ループ状態なのか!?

vistaproxycfgの代わりのnetshとか使ったけどだめ。
うーん・・・

とりあえずコマンドプロンプトを管理者権限で実行して「wuauclt /detectnow」をやってみる。

でもWindows\WindowsUpdate.logにはエラーが出ない。謎だ。
そしてコンパネの更新プログラムの確認には「最新の状態です」となった。(WSUSで配布していたので間違いない)
しかし「更新プログラムの確認」をクリックすると「80070005」になる。GUIベースのアップデートが出来ないという結果になった。

仕事のお時間が終わりなので今日はここまで!