mirror of https://github.com/ventoy/Ventoy.git
1.0.55 release
This commit is contained in:
parent
0fa25c4526
commit
734c7b8ac4
|
@ -21,7 +21,7 @@ body:
|
|||
attributes:
|
||||
label: Ventoy Version
|
||||
description: What version of ventoy are you running?
|
||||
placeholder: 1.0.54
|
||||
placeholder: 1.0.55
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
|
|
|
@ -1049,6 +1049,7 @@ int ventoy_fill_windows_rtdata(void *buf, char *isopath)
|
|||
{
|
||||
char *pos = NULL;
|
||||
char *script = NULL;
|
||||
const char *env = NULL;
|
||||
ventoy_windows_data *data = (ventoy_windows_data *)buf;
|
||||
|
||||
grub_memset(data, 0, sizeof(ventoy_windows_data));
|
||||
|
@ -1087,7 +1088,13 @@ int ventoy_fill_windows_rtdata(void *buf, char *isopath)
|
|||
{
|
||||
debug("injection archive not configed %s\n", pos);
|
||||
}
|
||||
|
||||
|
||||
env = grub_env_get("VTOY_WIN11_BYPASS_CHECK");
|
||||
if (env && env[0] == '1' && env[1] == 0)
|
||||
{
|
||||
data->windows11_bypass_check = 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -135,7 +135,8 @@ typedef struct ventoy_windows_data
|
|||
{
|
||||
char auto_install_script[384];
|
||||
char injection_archive[384];
|
||||
grub_uint8_t reserved[256];
|
||||
grub_uint8_t windows11_bypass_check;
|
||||
grub_uint8_t reserved[255];
|
||||
}ventoy_windows_data;
|
||||
|
||||
|
||||
|
|
Binary file not shown.
|
@ -1967,7 +1967,7 @@ function img_unsupport_menuentry {
|
|||
#############################################################
|
||||
#############################################################
|
||||
|
||||
set VENTOY_VERSION="1.0.54"
|
||||
set VENTOY_VERSION="1.0.55"
|
||||
|
||||
#ACPI not compatible with Window7/8, so disable by default
|
||||
set VTOY_PARAM_NO_ACPI=1
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -16,7 +16,7 @@ You can copy many image files at a time and ventoy will give you a boot menu to
|
|||
x86 Legacy BIOS, IA32 UEFI, x86_64 UEFI, ARM64 UEFI and MIPS64EL UEFI are supported in the same way.<br/>
|
||||
Both MBR and GPT partition style are supported in the same way.<br/>
|
||||
Most type of OS supported(Windows/WinPE/Linux/Unix/ChromeOS/Vmware/Xen...) <br/>
|
||||
740+ ISO files are tested (<a href="https://www.ventoy.net/en/isolist.html">List</a>). 90%+ distros in <a href="https://distrowatch.com/">distrowatch.com</a> supported (<a href="https://www.ventoy.net/en/distrowatch.html">Details</a>). <br/>
|
||||
750+ ISO files are tested (<a href="https://www.ventoy.net/en/isolist.html">List</a>). 90%+ distros in <a href="https://distrowatch.com/">distrowatch.com</a> supported (<a href="https://www.ventoy.net/en/distrowatch.html">Details</a>). <br/>
|
||||
<br/>Official Website: <a href=https://www.ventoy.net>https://www.ventoy.net</a>
|
||||
</h4>
|
||||
|
||||
|
@ -52,7 +52,7 @@ VMware ESXi, Citrix XenServer, Xen XCP-ng
|
|||
* FAT32/exFAT/NTFS/UDF/XFS/Ext2(3)(4) supported for main partition
|
||||
* ISO files larger than 4GB supported
|
||||
* Native boot menu style for Legacy & UEFI
|
||||
* Most type of OS supported, 740+ iso files tested
|
||||
* Most type of OS supported, 750+ iso files tested
|
||||
* Linux vDisk boot supported
|
||||
* Not only boot but also complete installation process
|
||||
* Menu dynamically switchable between List/TreeView mode
|
||||
|
|
|
@ -1248,6 +1248,117 @@ static int ProcessUnattendedInstallation(const char *script)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int Windows11BypassCheck(const char *isofile, const char MntLetter)
|
||||
{
|
||||
int Ret = 1;
|
||||
DWORD dwHandle;
|
||||
DWORD dwSize;
|
||||
DWORD dwValue = 1;
|
||||
UINT VerLen = 0;
|
||||
CHAR *Buffer = NULL;
|
||||
VS_FIXEDFILEINFO* VerInfo = NULL;
|
||||
CHAR CheckFile[MAX_PATH];
|
||||
UINT16 Major, Minor, Build, Revision;
|
||||
|
||||
Log("Windows11BypassCheck for <%s> %C:", isofile, MntLetter);
|
||||
|
||||
if (FALSE == IsFileExist("%C:\\sources\\boot.wim", MntLetter) ||
|
||||
FALSE == IsFileExist("%C:\\sources\\compatresources.dll", MntLetter))
|
||||
{
|
||||
Log("boot.wim/compatresources.dll not exist, this is not a windows install media.");
|
||||
goto End;
|
||||
}
|
||||
|
||||
if (FALSE == IsFileExist("%C:\\sources\\install.wim", MntLetter) &&
|
||||
FALSE == IsFileExist("%C:\\sources\\install.esd", MntLetter))
|
||||
{
|
||||
Log("install.wim/install.esd not exist, this is not a windows install media.");
|
||||
goto End;
|
||||
}
|
||||
|
||||
sprintf_s(CheckFile, sizeof(CheckFile), "%C:\\sources\\compatresources.dll", MntLetter);
|
||||
dwSize = GetFileVersionInfoSizeA(CheckFile, &dwHandle);
|
||||
if (0 == dwSize)
|
||||
{
|
||||
Log("Failed to get file version info size: %u", LASTERR);
|
||||
goto End;
|
||||
}
|
||||
|
||||
Buffer = malloc(dwSize);
|
||||
if (!Buffer)
|
||||
{
|
||||
goto End;
|
||||
}
|
||||
|
||||
if (FALSE == GetFileVersionInfoA(CheckFile, dwHandle, dwSize, Buffer))
|
||||
{
|
||||
Log("Failed to get file version info : %u", LASTERR);
|
||||
goto End;
|
||||
}
|
||||
|
||||
if (VerQueryValueA(Buffer, "\\", (LPVOID)&VerInfo, &VerLen) && VerLen != 0)
|
||||
{
|
||||
if (VerInfo->dwSignature == VS_FFI_SIGNATURE)
|
||||
{
|
||||
Major = HIWORD(VerInfo->dwFileVersionMS);
|
||||
Minor = LOWORD(VerInfo->dwFileVersionMS);
|
||||
Build = HIWORD(VerInfo->dwFileVersionLS);
|
||||
Revision = LOWORD(VerInfo->dwFileVersionLS);
|
||||
|
||||
Log("FileVersionze: <%u %u %u %u>", Major, Minor, Build, Revision);
|
||||
|
||||
if (Major == 10 && Build > 20000)
|
||||
{
|
||||
Major = 11;
|
||||
}
|
||||
|
||||
if (Major != 11)
|
||||
{
|
||||
Log("This is not Windows 11, not need to bypass.", Major);
|
||||
goto End;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Now we really need to bypass windows 11 check. create registry
|
||||
HKEY hKey = NULL;
|
||||
HKEY hSubKey = NULL;
|
||||
LSTATUS Status;
|
||||
|
||||
Status = RegCreateKeyExA(HKEY_LOCAL_MACHINE, "System\\Setup", 0, NULL, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &hKey, &dwSize);
|
||||
if (ERROR_SUCCESS != Status)
|
||||
{
|
||||
Log("Failed to create reg key System\\Setup %u %u", LASTERR, Status);
|
||||
goto End;
|
||||
}
|
||||
|
||||
Status = RegCreateKeyExA(hKey, "LabConfig", 0, NULL, 0, KEY_SET_VALUE | KEY_QUERY_VALUE | KEY_CREATE_SUB_KEY, NULL, &hSubKey, &dwSize);
|
||||
if (ERROR_SUCCESS != Status)
|
||||
{
|
||||
Log("Failed to create LabConfig reg %u %u", LASTERR, Status);
|
||||
goto End;
|
||||
}
|
||||
|
||||
//set reg value
|
||||
Status += RegSetValueExA(hSubKey, "BypassRAMCheck", 0, REG_DWORD, (LPBYTE)&dwValue, sizeof(DWORD));
|
||||
Status += RegSetValueExA(hSubKey, "BypassTPMCheck", 0, REG_DWORD, (LPBYTE)&dwValue, sizeof(DWORD));
|
||||
Status += RegSetValueExA(hSubKey, "BypassSecureBootCheck", 0, REG_DWORD, (LPBYTE)&dwValue, sizeof(DWORD));
|
||||
Status += RegSetValueExA(hSubKey, "BypassStorageCheck", 0, REG_DWORD, (LPBYTE)&dwValue, sizeof(DWORD));
|
||||
Status += RegSetValueExA(hSubKey, "BypassCPUCheck", 0, REG_DWORD, (LPBYTE)&dwValue, sizeof(DWORD));
|
||||
|
||||
Log("Create bypass registry %s %u", (Status == ERROR_SUCCESS) ? "SUCCESS" : "FAILED", Status);
|
||||
|
||||
Ret = 0;
|
||||
|
||||
End:
|
||||
if (Buffer)
|
||||
{
|
||||
free(Buffer);
|
||||
}
|
||||
|
||||
return Ret;
|
||||
}
|
||||
|
||||
static int VentoyHook(ventoy_os_param *param)
|
||||
{
|
||||
int i;
|
||||
|
@ -1327,7 +1438,7 @@ static int VentoyHook(ventoy_os_param *param)
|
|||
rc = MountIsoFile(IsoPath, DiskExtent.DiskNumber);
|
||||
|
||||
NewDrives = GetLogicalDrives();
|
||||
Log("Drives after mount: 0x%x", NewDrives);
|
||||
Log("Drives after mount: 0x%x (0x%x)", NewDrives, (NewDrives ^ Drives));
|
||||
|
||||
MntLetter = 'A';
|
||||
NewDrives = (NewDrives ^ Drives);
|
||||
|
@ -1335,7 +1446,14 @@ static int VentoyHook(ventoy_os_param *param)
|
|||
{
|
||||
if (NewDrives & 0x01)
|
||||
{
|
||||
Log("Maybe the ISO file is mounted at %C:", MntLetter);
|
||||
if ((NewDrives >> 1) == 0)
|
||||
{
|
||||
Log("The ISO file is mounted at %C:", MntLetter);
|
||||
}
|
||||
else
|
||||
{
|
||||
Log("Maybe the ISO file is mounted at %C:", MntLetter);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -1345,6 +1463,12 @@ static int VentoyHook(ventoy_os_param *param)
|
|||
|
||||
Log("Mount ISO FILE: %s", rc == 0 ? "SUCCESS" : "FAILED");
|
||||
|
||||
//Windows 11 bypass check
|
||||
if (g_windows_data.windows11_bypass_check == 1)
|
||||
{
|
||||
Windows11BypassCheck(IsoPath, MntLetter);
|
||||
}
|
||||
|
||||
// for protect
|
||||
rc = DeleteVentoyPart2MountPoint(DiskExtent.DiskNumber);
|
||||
Log("Delete ventoy mountpoint: %s", rc == 0 ? "SUCCESS" : "NO NEED");
|
||||
|
@ -1407,6 +1531,8 @@ static int VentoyHook(ventoy_os_param *param)
|
|||
sprintf_s(StrBuf, sizeof(StrBuf), "cmd.exe /c %s \"%s\" %C", AUTO_RUN_BAT, IsoPath, MntLetter);
|
||||
CreateProcessA(NULL, StrBuf, NULL, NULL, TRUE, flags, NULL, NULL, &Si, &Pi);
|
||||
WaitForSingleObject(Pi.hProcess, INFINITE);
|
||||
|
||||
SAFE_CLOSE_HANDLE(hOut);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -69,7 +69,8 @@ typedef struct ventoy_windows_data
|
|||
{
|
||||
char auto_install_script[384];
|
||||
char injection_archive[384];
|
||||
UINT8 reserved[256];
|
||||
UINT8 windows11_bypass_check;
|
||||
UINT8 reserved[255];
|
||||
}ventoy_windows_data;
|
||||
|
||||
|
||||
|
|
|
@ -135,7 +135,7 @@
|
|||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<AdditionalDependencies>VirtDisk.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>Version.lib;VirtDisk.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
|
@ -155,7 +155,8 @@
|
|||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<AdditionalDependencies>VirtDisk.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>Version.lib;VirtDisk.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<DelayLoadDLLs>Version.dll;VirtDisk.dll</DelayLoadDLLs>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
|
|
Loading…
Reference in New Issue