From: longpanda Date: Fri, 6 Jan 2023 13:26:31 +0000 (+0800) Subject: Optimization for VTOY_WIN11_BYPASS_NRO option process. X-Git-Tag: v1.0.87~4 X-Git-Url: https://glassweightruler.freedombox.rocks/gitweb/Ventoy.git/commitdiff_plain/47e1553d23048c6f251ea734fed9ab3486552538?ds=sidebyside Optimization for VTOY_WIN11_BYPASS_NRO option process. --- diff --git a/INSTALL/ventoy/vtoyjump32.exe b/INSTALL/ventoy/vtoyjump32.exe index 073f56f..35e1a59 100644 Binary files a/INSTALL/ventoy/vtoyjump32.exe and b/INSTALL/ventoy/vtoyjump32.exe differ diff --git a/INSTALL/ventoy/vtoyjump64.exe b/INSTALL/ventoy/vtoyjump64.exe index 6a78cfb..d09cac7 100644 Binary files a/INSTALL/ventoy/vtoyjump64.exe and b/INSTALL/ventoy/vtoyjump64.exe differ diff --git a/vtoyjump/vtoyjump/vtoyjump.c b/vtoyjump/vtoyjump/vtoyjump.c index d56f23d..29e1d5e 100644 --- a/vtoyjump/vtoyjump/vtoyjump.c +++ b/vtoyjump/vtoyjump/vtoyjump.c @@ -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); } diff --git a/vtoyjump/vtoyjump/vtoyjump.h b/vtoyjump/vtoyjump/vtoyjump.h index 335a6f4..f16426d 100644 --- a/vtoyjump/vtoyjump/vtoyjump.h +++ b/vtoyjump/vtoyjump/vtoyjump.h @@ -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 diff --git a/vtoyjump/vtoyjump/vtoyjump.vcxproj b/vtoyjump/vtoyjump/vtoyjump.vcxproj index 05a89ad..c6eed64 100644 --- a/vtoyjump/vtoyjump/vtoyjump.vcxproj +++ b/vtoyjump/vtoyjump/vtoyjump.vcxproj @@ -168,6 +168,7 @@ + diff --git a/vtoyjump/vtoyjump/vtoyjump.vcxproj.filters b/vtoyjump/vtoyjump/vtoyjump.vcxproj.filters index 2de1846..c721c2a 100644 --- a/vtoyjump/vtoyjump/vtoyjump.vcxproj.filters +++ b/vtoyjump/vtoyjump/vtoyjump.vcxproj.filters @@ -45,6 +45,9 @@ 源文件 + + 源文件 +