mirror of https://github.com/ventoy/Ventoy.git
Optimization for VTOY_WIN11_BYPASS_NRO option process.
This commit is contained in:
parent
686ed11037
commit
47e1553d23
Binary file not shown.
Binary file not shown.
|
@ -492,7 +492,7 @@ static int Utf8ToUtf16(const char* src, WCHAR * dst)
|
|||
return MultiByteToWideChar(CP_UTF8, 0, src, -1, dst, size + 1);
|
||||
}
|
||||
|
||||
static BOOL IsDirExist(const char *Fmt, ...)
|
||||
BOOL IsDirExist(const char *Fmt, ...)
|
||||
{
|
||||
va_list Arg;
|
||||
DWORD Attr;
|
||||
|
@ -524,7 +524,7 @@ static BOOL IsDirExist(const char *Fmt, ...)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
static BOOL IsFileExist(const char *Fmt, ...)
|
||||
BOOL IsFileExist(const char *Fmt, ...)
|
||||
{
|
||||
va_list Arg;
|
||||
HANDLE hFile;
|
||||
|
@ -2204,7 +2204,7 @@ static int Windows11Bypass(const char *isofile, const char MntLetter, UINT8 Chec
|
|||
HKEY hKey = NULL;
|
||||
HKEY hSubKey = NULL;
|
||||
LSTATUS Status;
|
||||
DWORD dwValue;
|
||||
DWORD dwValue = 1;
|
||||
DWORD dwSize;
|
||||
|
||||
Log("Windows11Bypass for <%s> %C: Check:%u NRO:%u", isofile, MntLetter, Check, NRO);
|
||||
|
@ -2260,6 +2260,8 @@ static int Windows11Bypass(const char *isofile, const char MntLetter, UINT8 Chec
|
|||
|
||||
Status += RegSetValueExA(hSubKey, "BypassNRO", 0, REG_DWORD, (LPBYTE)&dwValue, sizeof(DWORD));
|
||||
Log("Create BypassNRO registry %s %u", (Status == ERROR_SUCCESS) ? "SUCCESS" : "FAILED", Status);
|
||||
|
||||
SetupMonNroStart(isofile);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -195,5 +195,9 @@ int unxz(unsigned char *in, int in_size,
|
|||
unsigned char *out, int *in_used,
|
||||
void(*error)(char *x));
|
||||
|
||||
void Log(const char* Fmt, ...);
|
||||
int SetupMonNroStart(const char* isopath);
|
||||
BOOL IsFileExist(const char* Fmt, ...);
|
||||
BOOL IsDirExist(const char* Fmt, ...);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -168,6 +168,7 @@
|
|||
<ClCompile Include="fat_io_lib\fat_string.c" />
|
||||
<ClCompile Include="fat_io_lib\fat_table.c" />
|
||||
<ClCompile Include="fat_io_lib\fat_write.c" />
|
||||
<ClCompile Include="setupmon.c" />
|
||||
<ClCompile Include="vtoyjump.c" />
|
||||
<ClCompile Include="xz-embedded-20130513\linux\lib\decompress_unxz.c" />
|
||||
</ItemGroup>
|
||||
|
|
|
@ -45,6 +45,9 @@
|
|||
<ClCompile Include="xz-embedded-20130513\linux\lib\decompress_unxz.c">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="setupmon.c">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="vtoyjump.h">
|
||||
|
|
Loading…
Reference in New Issue