ventoy / Ventoy

A new bootable USB solution.
https://www.ventoy.net
GNU General Public License v3.0
62.94k stars 4.1k forks source link

Config File Wildcards #929

Closed AdamKearn closed 3 years ago

AdamKearn commented 3 years ago

Hi All,

See my below config file used for ventoy. I was wondering if anyone knows how to get wildcards working for referencing images?

Instead of providing the full path the the ISO file can we use something like Win10*.iso so anything that starts with "Win10" will get the answer files added and also injected custom files.

Love this project by the way... Saves soo much time instead of rebuilding USBs every time there is a new update released.

{
    "theme":{
        "file":"/ventoy/theme/<redacted>/theme.txt"
    },
    "auto_install":[
        {
            "image":"/images/microsoft/Win10_20H2_R2_English_x64.iso",
            "template":[
                "/images/microsoft/unattended/<redacted>_unattended_setup_UEFI.xml",
                "/images/microsoft/unattended/<redacted>_unattended_setup_BIOS.xml",
                "/images/microsoft/unattended/autounattend.xml"
            ]
        }
    ],
    "injection":[
        {
            "image":"/images/microsoft/Win10_20H2_R2_English_x64.iso",
            "archive":"/scripts/wim_mod.zip"
        }
    ],
    "control": [
        { "VTOY_DEFAULT_IMAGE": "/images/microsoft/Win10_20H2_R2_English_x64.iso" },
        { "VTOY_MENU_TIMEOUT": "5" }
    ]
}
ventoy commented 3 years ago

parent option in auto_install and injection plugin can be helpful. Refer : https://www.ventoy.net/en/plugin_autoinstall.html https://www.ventoy.net/en/plugin_injection.html

AdamKearn commented 3 years ago

Hi @ventoy,

I tried using the parent option but after modifying the JSON file to use those options it would no longer detect the answer files or inject the ZIP file...

I am currently only using Windows ISOs (20H2 and 21H1)

As a test I pressed the F5 key and ran the Check the auto install plugin configuration and that reported that there was no images detected. (See image below)

It looks like the injection didn't work with this method as well as I couldn't see the files inside the WinPE environment.

Not sure if I am using it incorrectly. Please see config below:

image


{
    "theme":{
        "file":"/ventoy/theme/aspentech/theme.txt"
    },
    "auto_install":[
        {
            "parent":"/images/microsoft/",
            "template":[
                "/images/microsoft/unattended/apsentech_unattended_setup_UEFI.xml",
                "/images/microsoft/unattended/apsentech_unattended_setup_BIOS.xml",
                "/images/microsoft/unattended/autounattend.xml"
            ]
        }
    ],
    "injection":[
        {
            "parent":"/images/microsoft/",
            "archive":"/scripts/wim_mod.zip"
        }
    ],
    "control": [
        { "VTOY_DEFAULT_IMAGE": "/images/microsoft/Win10_20H2_R2_English_x64.iso" },
        { "VTOY_MENU_TIMEOUT": "5" }
    ]
}
steve6375 commented 3 years ago

Update to latest version of Ventoy?

AdamKearn commented 3 years ago

Hi @steve6375,

I was originally using ventoy-1.0.32 But I have just used the Windows Utility to update my VHD to use the latest build (ventoy-1.0.45) but I am still having this issue.

steve6375 commented 3 years ago

are all files on first partition and in correct folder? How is ptn1 formatted? NTFS?

AdamKearn commented 3 years ago

That was the first thing I checked. I copied and pasted the names of the folders to check to make sure I hadn't made a typo or anything.

It looks like the First Partition is formatted using exFAT. The only thing I did was enable Secure Boot and told it to format using MBR instead of GPT

(See images below)

image

image image

ventoy commented 3 years ago

Remove the trailing / of parent option and retry.

{
    "theme":{
        "file":"/ventoy/theme/aspentech/theme.txt"
    },
    "auto_install":[
        {
            "parent":"/images/microsoft",
            "template":[
                "/images/microsoft/unattended/apsentech_unattended_setup_UEFI.xml",
                "/images/microsoft/unattended/apsentech_unattended_setup_BIOS.xml",
                "/images/microsoft/unattended/autounattend.xml"
            ]
        }
    ],
    "injection":[
        {
            "parent":"/images/microsoft",
            "archive":"/scripts/wim_mod.zip"
        }
    ],
    "control": [
        { "VTOY_DEFAULT_IMAGE": "/images/microsoft/Win10_20H2_R2_English_x64.iso" },
        { "VTOY_MENU_TIMEOUT": "5" }
    ]
}
AdamKearn commented 3 years ago

@steve6375 @ventoy That's it !!!!!! It was the trailing slash at the end of the path.

Thank you very much everyone for your help. Everything works completely fine now. Lovely weather here in the UK.... too bad I am stuck inside at work today. ;)

Thanks again for your help. I would love to help contribute to this project but I don't know much stuff about the low-level booting stuff. That's all magic to me. LOL