Skip to content

Commit 9039d40

Browse files
committed
set DOTNET_EnableWriteXorExecute=0 under win10
#5186
1 parent 74a0a93 commit 9039d40

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

v2rayN/v2rayN/App.xaml.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,12 @@ private void Init()
5858
Environment.Exit(0);
5959
return;
6060
}
61-
//if (RuntimeInformation.ProcessArchitecture != Architecture.X86 && RuntimeInformation.ProcessArchitecture != Architecture.X64)
62-
//{
63-
// _config.guiItem.enableStatistics = false;
64-
//}
61+
62+
//Under Win10
63+
if (Environment.OSVersion.Version.Major < 10)
64+
{
65+
Environment.SetEnvironmentVariable("DOTNET_EnableWriteXorExecute", "0", EnvironmentVariableTarget.Process);
66+
}
6567
}
6668

6769
private void App_DispatcherUnhandledException(object sender, DispatcherUnhandledExceptionEventArgs e)

0 commit comments

Comments
 (0)