01-15-2022, 12:44 PM
https://github.com/ventoy/WinInjection/b...ection.zip
The above ZIP file contains the script "pack.bat", which uses 7-Zip to create "windows_injection.7z".
I have written the following code, which uses PowerShell to create "windows_injection.zip", which also works with Ventoy Injection Plugin. As PowerShell is a Windows built-in app, the third-party apps "7za32.exe" and "7za64.exe" are not needed. Just copy the following code into a CMD/batch script, which can then be used in place of "pack.bat". The "internal" folder, which contains the said third-party apps, can simply be deleted.
The above ZIP file contains the script "pack.bat", which uses 7-Zip to create "windows_injection.7z".
I have written the following code, which uses PowerShell to create "windows_injection.zip", which also works with Ventoy Injection Plugin. As PowerShell is a Windows built-in app, the third-party apps "7za32.exe" and "7za64.exe" are not needed. Just copy the following code into a CMD/batch script, which can then be used in place of "pack.bat". The "internal" folder, which contains the said third-party apps, can simply be deleted.
Code:
@echo off & CD /d "%~dp0" & Set "[ZIP]=windows_injection"
If exist "%[ZIP]%.zip" Del "%[ZIP]%.zip"
PowerShell Compress-Archive """X\*""" """%[ZIP]%"""
Mode con cols=72 lines=10 & color 17 & Echo.
Echo ======================================================================
If exist "%~dp0%[ZIP]%.zip" (Echo.
Echo The following file has been created in the current working directory.
Echo. & Echo "%[ZIP]%.zip") else (Echo.
Echo The operation has failed for some reason.)
Echo.
Echo ======================================================================
Pause>nul