トップ回答者
DISMで作成したwimファイルの一部を変更できますか?

質問
-
こんにちは。
Windows10でDISMコマンドでwimファイルを作成し、更新していますが、
あるファイルだけ差し替えて再度wimファイルを更新したところ、解決できないエラーに遭遇しました
-sysprepのエラー→ログは下記
仕方なく既存イメージを展開したあと、
コマンドでファイルを差し替えたあとwimを再作成するとうまくいきましたが、
Useの下にdefaultuser0 というプロファイルができてしまいました。
思いついたのは
「wimの中身を展開し、コピー&ペーストのような形で更新できないか?」ということですがどうでしょうか?
GhostエクスプローラのようなTOOLがあるとよいのですが、、
#実行コマンド c:\windows\system32\sysprep\sysprep /generalize /oobe /shutdown /unattend:untitled.xml
#エラーメッセージ ’Sysprep で Windows のインストールを検証できませんでした。詳細については、%WINDIR%\System32\Sysprep\Panther\setupact.log にあるログ ファイルを確認してください。問題を解決してから、Sysprep を使用してインストールを再度検証してください。
#setupact.log のログ Microsoft.Print3Dが怪しいような。。
2019-02-18 18:44:48, Info SYSPRP ========================================================
2019-02-18 18:44:48, Info SYSPRP === Beginning of a new sysprep run ===
2019-02-18 18:44:48, Info SYSPRP ========================================================
2019-02-18 18:44:48, Info [0x0f004d] SYSPRP The time is now 2019-02-18 18:44:48
2019-02-18 18:44:48, Info [0x0f004e] SYSPRP Initialized SysPrep log at C:\windows\system32\sysprep\Panther
2019-02-18 18:44:48, Info [0x0f0054] SYSPRP ValidatePrivileges:User has required privileges to sysprep machine
2019-02-18 18:44:48, Info [0x0f007e] SYSPRP FCreateTagFile:Tag file C:\windows\system32\sysprep\Sysprep_succeeded.tag does not already exist, no need to delete anything
2019-02-18 18:44:48, Info [0x0f005f] SYSPRP ParseCommands:Found supported command line option 'GENERALIZE'
2019-02-18 18:44:48, Info [0x0f005f] SYSPRP ParseCommands:Found supported command line option 'OOBE'
2019-02-18 18:44:48, Info [0x0f005f] SYSPRP ParseCommands:Found supported command line option 'SHUTDOWN'
2019-02-18 18:44:48, Info [0x0f005f] SYSPRP ParseCommands:Found supported command line option 'UNATTEND'
2019-02-18 18:44:48, Info [0x0f00d7] SYSPRP WinMain:Pre-validing 'cleanup' internal providers.
2019-02-18 18:44:48, Info SYSPRP RunExternalDlls:Running platform actions specified in action file for phase 3
2019-02-18 18:44:48, Info SYSPRP SysprepSession::CreateSession: Successfully created instance with action file C:\Windows\System32\Sysprep\ActionFiles\Cleanup.xml, and mode <null>
2019-02-18 18:44:48, Info SYSPRP SysprepSession::Validate: Beginning action execution from C:\Windows\System32\Sysprep\ActionFiles\Cleanup.xml
2019-02-18 18:44:48, Info SYSPRP SysprepSession::CreateXPathForSelection: Sysprep mode in registry is <null>
2019-02-18 18:44:48, Info SYSPRP SysprepSession::CreateXPathForSelection: Processor architecture in registry is AMD64
2019-02-18 18:44:48, Info SYSPRP ActionPlatform::LaunchModule: Executing method 'Sysprep_Clean_Validate_Opk' from C:\Windows\System32\spopk.dll
2019-02-18 18:44:54, Info SYSPRP ActionPlatform::LaunchModule: Successfully executed 'Sysprep_Clean_Validate_Opk' from C:\Windows\System32\spopk.dll without error
2019-02-18 18:44:54, Info [0x0f00d7] SYSPRP WinMain:Pre-validing 'generalize' internal providers.
2019-02-18 18:44:54, Info SYSPRP RunExternalDlls:Running platform actions specified in action file for phase 1
2019-02-18 18:44:54, Info SYSPRP SysprepSession::CreateSession: Successfully created instance with action file C:\Windows\System32\Sysprep\ActionFiles\Generalize.xml, and mode <null>
2019-02-18 18:44:54, Info SYSPRP SysprepSession::Validate: Beginning action execution from C:\Windows\System32\Sysprep\ActionFiles\Generalize.xml
2019-02-18 18:44:54, Info SYSPRP SysprepSession::CreateXPathForSelection: Sysprep mode in registry is <null>
2019-02-18 18:44:54, Info SYSPRP SysprepSession::CreateXPathForSelection: Processor architecture in registry is AMD64
2019-02-18 18:44:54, Info SYSPRP ActionPlatform::LaunchModule: Executing method 'SysprepGeneralizeValidate' from C:\Windows\System32\AppxSysprep.dll
2019-02-18 18:44:54, Info SYSPRP Entering SysprepGeneralizeValidate (Appx) - validating whether all apps are also provisioned.2019-02-18 18:44:55, Error SYSPRP Package Microsoft.Print3D_2.0.3621.0_x64__8wekyb3d8bbwe was installed for a user, but not provisioned for all users. This package will not function properly in the sysprep image.
2019-02-18 18:44:55, Error SYSPRP Failed to remove apps for the current user: 0x80073cf2.
2019-02-18 18:44:55, Error SYSPRP Exit code of RemoveAllApps thread was 0x3cf2.
2019-02-18 18:44:55, Error SYSPRP ActionPlatform::LaunchModule: Failure occurred while executing 'SysprepGeneralizeValidate' from C:\Windows\System32\AppxSysprep.dll; dwRet = 0x3cf2
2019-02-18 18:44:55, Error SYSPRP SysprepSession::Validate: Error in validating actions from C:\Windows\System32\Sysprep\ActionFiles\Generalize.xml; dwRet = 0x3cf2
2019-02-18 18:44:55, Error SYSPRP RunPlatformActions:Failed while validating Sysprep session actions; dwRet = 0x3cf2
2019-02-18 18:44:55, Error [0x0f0070] SYSPRP RunExternalDlls:An error occurred while running registry sysprep DLLs, halting sysprep execution. dwRet = 0x3cf2
2019-02-18 18:44:55, Error [0x0f00d8] SYSPRP WinMain:Hit failure while pre-validate sysprep generalize internal providers; hr = 0x80073cf2以上です。情報共有いただくと幸いです。よろしくお願いします。
回答
-
いちいち wim ファイルを展開して変更を加え、再度イメージ取得するのでは無く、wim ファイルのイメージの中身をファイルベースで変更したいという事で良かったでしょうか?
であれば、以下で解説されている様に DISM の /Mount-image オプションを使うことで、wim ファイルをマウントしてイメージ内のファイルを変更する事ができます。
DISM を使った Windows イメージのマウントと変更
https://msdn.microsoft.com/ja-jp/library/windows/hardware/dn898591(v=vs.85).aspx
Modify a Windows image using DISM
- 回答としてマーク yepes 2019年3月9日 5:13
すべての返信
-
いちいち wim ファイルを展開して変更を加え、再度イメージ取得するのでは無く、wim ファイルのイメージの中身をファイルベースで変更したいという事で良かったでしょうか?
であれば、以下で解説されている様に DISM の /Mount-image オプションを使うことで、wim ファイルをマウントしてイメージ内のファイルを変更する事ができます。
DISM を使った Windows イメージのマウントと変更
https://msdn.microsoft.com/ja-jp/library/windows/hardware/dn898591(v=vs.85).aspx
Modify a Windows image using DISM
- 回答としてマーク yepes 2019年3月9日 5:13
-
ちなみに、sysprep が失敗した原因については、エラーログ的に以下の事象が発生したものと思われます。(たぶん、Microsoft.Print3D が自動更新されてしまったのでしょう)
組み込みの Windows イメージを含む Microsoft Store アプリを削除または更新した後で sysprep が失敗する