+ if [ $vtoy_mgr_flag -eq 1 ]; then
+ set vtoy_boot_mgr_exe="newc:bootmgr.exe:$vtoy_wimboot_prefix/$5"
+ elif [ $vtoy_mgr_flag -eq 2 ]; then
+ set vtoy_boot_mgr_efi="vf=bootmgr.efi:$vtoy_wimboot_prefix/$5"
+ elif [ $vtoy_mgr_flag -eq 3 ]; then
+ set vtoy_boot_mgr_exe="newc:bootmgr.exe:$vtoy_wimboot_prefix/$5"
+ set vtoy_boot_mgr_efi="vf=bootmgr.efi:$vtoy_wimboot_prefix/$6"
+ fi
+
+ vt_windows_wimboot_data $vtoy_wimboot_prefix/$vtoy_wim_path vtoy_init_exe
+
+ if [ "$grub_platform" = "pc" ]; then
+ linux16 "$vtoy_path/$vt_wimkernel" quiet
+ ventoy_debug_pause
+
+ vt_set_wim_load_prompt 1 "Loading files......"
+ initrd16 newc:$vtoy_init_exe:mem:${vtoy_wimboot_mem_addr}:size:${vtoy_wimboot_mem_size} \
+ $vtoy_boot_mgr_exe \
+ newc:vtoy_wimboot:$vtoy_wimboot_prefix/$vtoy_bcd_path \
+ newc:bcd:$vtoy_wimboot_prefix/$vtoy_bcd_path \
+ newc:boot.sdi:$vtoy_wimboot_prefix/$vtoy_sdi_path \
+ newc:boot.wim:$vtoy_wimboot_prefix/$vtoy_wim_path
+ vt_set_wim_load_prompt 0
+ boot
+ else
+ vt_set_wim_load_prompt 1 "Loading files......"
+ vt_load_file_to_mem "nodecompress" $vtoy_wimboot_prefix/$vtoy_wim_path vtoy_wimfile_mem
+ vt_set_wim_load_prompt 0
+
+ if [ $? -eq 0 ]; then
+ set vtoy_wimfile_path=mem:${vtoy_wimfile_mem_addr}:size:${vtoy_wimfile_mem_size}
+ else
+ set vtoy_wimfile_path=$vtoy_wimboot_prefix/$vtoy_wim_path