LoginSignup
0
0

More than 1 year has passed since last update.

Windows10のsysprepでエラー:回避

Posted at

・ハプニング

Windows10のPCセットアップには

  • OSのインストール
  • OSの各種設定
  • ソフトウェアのインストール/各種設定
  • デバイスドライバ設定

これらを複数台するのもかったり〜なぁと思ったので、
クローン作成!
でも固有情報、例えば

  • SID
  • イベントログ
  • ネットワークの設定
  • OS のライセンス

が障害になるので一般化することに。それがsysprep

【手順】

  1. [Windows]+[R]で「sysprep」と入力
  2. sysprep.exeがあるフォルダが表示される → sysprep.exeを実行
  3. GUIの「システム準備ツール(SYSPREP)」が表示
  4. 「システムのOOBE(...)に入る」を選択(デフォルト)
  5. ☑一般化する ← チェックをいれる
  6. 「シャットダウン」「再起動」のいずれか選択

これで進むはずが...

【エラー発生】

 「sysprepでwindowsのインストールを検証できませんでした。」
 「setupact.logを確認してください」
  のERRORメッセージ表示...うそやろ....

【なんとかせねば】

  • この場合、setupact.logよりsetuperr.logを見た方が手っ取り早い。
    C:\Windows\System32\Sysprep\Panther\setuperr.log
2023-03-29 11:46:58, Error                 SYSPRP Package Microsoft.AV1VideoExtension_1.1.52851.0_x64__8wekyb3d8bbwe was installed for a user, but not provisioned for all users. This package will not function properly in the sysprep image.
2023-03-29 11:46:58, Error                 SYSPRP Failed to remove apps for the current user: 0x80073cf2.
2023-03-29 11:46:58, Error                 SYSPRP Exit code of RemoveAllApps thread was 0x3cf2.
2023-03-29 11:46:58, Error                 SYSPRP ActionPlatform::LaunchModule: Failure occurred while executing 'SysprepGeneralizeValidate' from C:\Windows\System32\AppxSysprep.dll; dwRet = 0x3cf2
2023-03-29 11:46:58, Error                 SYSPRP SysprepSession::Validate: Error in validating actions from C:\Windows\System32\Sysprep\ActionFiles\Generalize.xml; dwRet = 0x3cf2
2023-03-29 11:46:58, Error                 SYSPRP RunPlatformActions:Failed while validating Sysprep session actions; dwRet = 0x3cf2
2023-03-29 11:46:58, Error      [0x0f0070] SYSPRP RunDlls:An error occurred while running registry sysprep DLLs, halting sysprep execution. dwRet = 0x3cf2
2023-03-29 11:46:58, Error      [0x0f00d8] SYSPRP WinMain:Hit failure while pre-validate sysprep generalize internal providers; hr = 0x80073cf2
2023-03-29 11:50:26, Error                 SYSPRP Package Microsoft.AV1VideoExtension_1.1.52851.0_x64__8wekyb3d8bbwe was installed for a user, but not provisioned for all users. This package will not function properly in the sysprep image.
2023-03-29 11:50:26, Error                 SYSPRP Failed to remove apps for the current user: 0x80073cf2.
2023-03-29 11:50:26, Error                 SYSPRP Exit code of RemoveAllApps thread was 0x3cf2.
2023-03-29 11:50:26, Error                 SYSPRP ActionPlatform::LaunchModule: Failure occurred while executing 'SysprepGeneralizeValidate' from C:\Windows\System32\AppxSysprep.dll; dwRet = 0x3cf2
2023-03-29 11:50:26, Error                 SYSPRP SysprepSession::Validate: Error in validating actions from C:\Windows\System32\Sysprep\ActionFiles\Generalize.xml; dwRet = 0x3cf2
2023-03-29 11:50:26, Error                 SYSPRP RunPlatformActions:Failed while validating Sysprep session actions; dwRet = 0x3cf2
2023-03-29 11:50:26, Error      [0x0f0070] SYSPRP RunDlls:An error occurred while running registry sysprep DLLs, halting sysprep execution. dwRet = 0x3cf2
2023-03-29 11:50:26, Error      [0x0f00d8] SYSPRP WinMain:Hit failure while pre-validate sysprep generalize internal providers; hr = 0x80073cf2

...というログの内容だったので、1行目の

Error SYSPRP Package Microsoft.AV1VideoExtension_1.1.52851.0_x64__8wekyb3d8bbwe was installed

に注目しました。

調べた結果、SysprepをPackageが邪魔してます、とのことらしいので
「Microsoft.AV1VideoExtension....」を削除

【実際に削除】

  • 削除コマンドはPowerShell(管理者として)から実行
    以下のようにしてDOSコマンドラインで入力&ENTER!
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "Start-Process PowerShell.exe -Verb runas"

とすると別のWindowでPowerShell(管理者)を起動できる
そこで以下の削除コマンドを実行

PowerShell-⭐️
Get-AppxPackage -AllUsers Microsoft.AV1VideoExtension* | Remove-AppxPackage -AllUsers

        (アンダースコア以降はワイルドカード[*]で省略してOK)

しかし、またエラーメッセージ...

「このワークステーションとプライマリドメインとの信頼関係に失敗しました」
(PowerShellコマンドライン)

ドメインのキーワードから...

  1. このPCが参加していたドメインから一度切り離しWORKGROUPへ変更
  2. 再度PowerShell-⭐️のコマンドを実行

Mission Complete!

【やっとこさ】

◎これで邪魔になっていたPackageが削除されたので、

  • [Windows]+[R]で「sysprep」と再度入力
    無事[一般化]成功!

あとがき

こんなふうにして

  1. PCのセットアップ
  2. それをイメージファイルへ変換
  3. イメージファイルをHDDかSSDへコピー
  4. 一般化実行
  5. 個別設定実施
    とすることで手間を減らせています。

何か他にアイディアがある方、「こっちの方が断然早いぜ」という方法をお持ちの方
ご連絡お待ちしていまーす。(^∇^)

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0