+ /* If template image was specified using --as-update-of=IMAGE rather
+ * than --as-update-of=WIMFILE:IMAGE, set the default WIMFILE. */
+ if (template_image_name_or_num && !template_wimfile) {
+ if (base_wimfile) {
+ /* Capturing delta WIM: default to base WIM. */
+ template_wimfile = base_wimfile;
+ } else if (cmd == CMD_APPEND) {
+ /* Appending to WIM: default to WIM being appended to.
+ */
+ template_wimfile = wimfile;
+ } else {
+ /* Capturing a normal (non-delta) WIM, so the WIM file
+ * *must* be explicitly specified. */
+ imagex_error(T("For capture of non-delta WIM, "
+ "'--as-update-of' must specify "
+ "WIMFILE:IMAGE!"));
+ goto out_usage;
+ }
+ }
+