About VentoyAutoRun.bat

  • 1. Background

Ventoy has provided Injection Plugin to inject files to the runtime envrionment after boos the ISO file.
For Windows ISO files, the injection is applied to the WinPE environment (X:\ drive)
Since Ventoy 1.0.55, if you inject a X:\VentoyAutoRun.bat file, Ventoy will run this bat file automatically.

Attention:
1. The method here must be used with Ventoy-1.0.55+
2. Support standard Windows ISO and most type of WinPE ISO, but some special WinPE may not support.

  • 2. When to call

For standard Windows ISO, Ventoy will call the bat before winpeshl.exe run.
For most type of WinPE ISO, Ventoy will call the bat before PECMD.EXE run.

  • 3. Parameters

For convenience, Ventoy will pass 2 parameters when calling X:\VentoyAutoRun.bat
Parameter 1, is the absolute path of the ISO file (e.g. C:\ISO\Windows10x86x64.iso).
Parameter 2, is the drive letter of the mountpoint of the ISO file (e.g. E)

  • 4. Log

The output of the bat will be saved to X:\VentoyAutoRun.log

  • 5. Template

For convenience, I have created a template. Download https://github.com/ventoy/WinInjection/blob/main/WinInjection.zip and decompress it.
VentoyAutoRun.bat is under X directory after decompression. You can modify it as you want.
Then, double-click pack.bat and it will create a windows_injection.7z file.
Finally, set the ventoy.json according to Injection Plugin as follows:

{
    "injection": [
        {
            "image": "/ISO/Windows10x86x64.iso",
            "archive": "/windows_injection.7z"
        }
    ]
}
  • 5. Screenshot