]> glassweightruler.freedombox.rocks Git - Ventoy.git/commitdiff
Optimization for VTOY_WIN11_BYPASS_NRO option process.
authorlongpanda <admin@ventoy.net>
Fri, 6 Jan 2023 13:26:31 +0000 (21:26 +0800)
committerlongpanda <admin@ventoy.net>
Fri, 6 Jan 2023 13:26:31 +0000 (21:26 +0800)
INSTALL/ventoy/vtoyjump32.exe
INSTALL/ventoy/vtoyjump64.exe
vtoyjump/vtoyjump/vtoyjump.c
vtoyjump/vtoyjump/vtoyjump.h
vtoyjump/vtoyjump/vtoyjump.vcxproj
vtoyjump/vtoyjump/vtoyjump.vcxproj.filters

index 073f56fe8e4d765038e631ac8f6aad59a7a3ac96..35e1a59df760aabdb8cb6ab192023e28035b9138 100644 (file)
Binary files a/INSTALL/ventoy/vtoyjump32.exe and b/INSTALL/ventoy/vtoyjump32.exe differ
index 6a78cfb485bc3cf17361a60ebcc5471626f48da7..d09cac7d44299dfb13c8561c725121759eef85aa 100644 (file)
Binary files a/INSTALL/ventoy/vtoyjump64.exe and b/INSTALL/ventoy/vtoyjump64.exe differ
index d56f23dcb969704deda6e01ce79ebce05b45ab59..29e1d5ea205b3263425a7738f598bce2d48a47a1 100644 (file)
@@ -492,7 +492,7 @@ static int Utf8ToUtf16(const char* src, WCHAR * dst)
     return MultiByteToWideChar(CP_UTF8, 0, src, -1, dst, size + 1);\r
 }\r
 \r
     return MultiByteToWideChar(CP_UTF8, 0, src, -1, dst, size + 1);\r
 }\r
 \r
-static BOOL IsDirExist(const char *Fmt, ...)\r
+BOOL IsDirExist(const char *Fmt, ...)\r
 {\r
     va_list Arg;    \r
     DWORD Attr;\r
 {\r
     va_list Arg;    \r
     DWORD Attr;\r
@@ -524,7 +524,7 @@ static BOOL IsDirExist(const char *Fmt, ...)
     return FALSE;\r
 }\r
 \r
     return FALSE;\r
 }\r
 \r
-static BOOL IsFileExist(const char *Fmt, ...)\r
+BOOL IsFileExist(const char *Fmt, ...)\r
 {\r
     va_list Arg;\r
     HANDLE hFile;\r
 {\r
     va_list Arg;\r
     HANDLE hFile;\r
@@ -2204,7 +2204,7 @@ static int Windows11Bypass(const char *isofile, const char MntLetter, UINT8 Chec
     HKEY hKey = NULL;\r
     HKEY hSubKey = NULL;\r
     LSTATUS Status;\r
     HKEY hKey = NULL;\r
     HKEY hSubKey = NULL;\r
     LSTATUS Status;\r
-    DWORD dwValue;\r
+    DWORD dwValue = 1;\r
     DWORD dwSize;\r
 \r
     Log("Windows11Bypass for <%s> %C: Check:%u NRO:%u", isofile, MntLetter, Check, NRO);\r
     DWORD dwSize;\r
 \r
     Log("Windows11Bypass for <%s> %C: Check:%u NRO:%u", isofile, MntLetter, Check, NRO);\r
@@ -2260,6 +2260,8 @@ static int Windows11Bypass(const char *isofile, const char MntLetter, UINT8 Chec
 \r
         Status += RegSetValueExA(hSubKey, "BypassNRO", 0, REG_DWORD, (LPBYTE)&dwValue, sizeof(DWORD));\r
         Log("Create BypassNRO registry %s %u", (Status == ERROR_SUCCESS) ? "SUCCESS" : "FAILED", Status);\r
 \r
         Status += RegSetValueExA(hSubKey, "BypassNRO", 0, REG_DWORD, (LPBYTE)&dwValue, sizeof(DWORD));\r
         Log("Create BypassNRO registry %s %u", (Status == ERROR_SUCCESS) ? "SUCCESS" : "FAILED", Status);\r
+\r
+        SetupMonNroStart(isofile);\r
     }\r
     \r
 \r
     }\r
     \r
 \r
index 335a6f49b7d535212a38253af73e846f0a995107..f16426ddb566dd03fadb54a7aaa8c61ec7de922c 100644 (file)
@@ -195,5 +195,9 @@ int unxz(unsigned char *in, int in_size,
     unsigned char *out, int *in_used,\r
     void(*error)(char *x));\r
 \r
     unsigned char *out, int *in_used,\r
     void(*error)(char *x));\r
 \r
+void Log(const char* Fmt, ...);\r
+int SetupMonNroStart(const char* isopath);\r
+BOOL IsFileExist(const char* Fmt, ...);\r
+BOOL IsDirExist(const char* Fmt, ...);\r
 \r
 #endif\r
 \r
 #endif\r
index 05a89ad61577d4579222c47686e85921fc071439..c6eed64baa0992bc829ea001f3cc5979570c8051 100644 (file)
     <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="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>
     <ClCompile Include="vtoyjump.c" />
     <ClCompile Include="xz-embedded-20130513\linux\lib\decompress_unxz.c" />
   </ItemGroup>
index 2de18461c3c996b4fab44803188033105094d9fd..c721c2ae49341ea297ca296bbbcd32ea5e214517 100644 (file)
@@ -45,6 +45,9 @@
     <ClCompile Include="xz-embedded-20130513\linux\lib\decompress_unxz.c">
       <Filter>源文件</Filter>
     </ClCompile>
     <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">
   </ItemGroup>
   <ItemGroup>
     <ClInclude Include="vtoyjump.h">