diff options
author | apacker1 <apacker1@users.noreply.github.com> | 2023-09-22 14:41:57 -0700 |
---|---|---|
committer | Bob Arnson <github@bobs.org> | 2023-10-03 23:46:43 -0400 |
commit | 0014af66faa541f70f84b22dc7aa5eea0d524d37 (patch) | |
tree | 3cda8a7f565946b93f8cb10af6612fdccb0a56b4 /src | |
parent | e570ce580afa981d3cf7750bea1d129309b48a06 (diff) | |
download | wix-0014af66faa541f70f84b22dc7aa5eea0d524d37.tar.gz wix-0014af66faa541f70f84b22dc7aa5eea0d524d37.tar.bz2 wix-0014af66faa541f70f84b22dc7aa5eea0d524d37.zip |
DotNetCompatibilityCheck: If running NetCoreCheck.exe fails with error code ERROR_EXE_MACHINE_TYPE_MISMATCH or ERROR_BAD_EXE_FORMAT then don't abort the installation, just set the property to 13. Fixes issue #7737
Diffstat (limited to 'src')
-rw-r--r-- | src/ext/NetFx/ca/netfxca.cpp | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/ext/NetFx/ca/netfxca.cpp b/src/ext/NetFx/ca/netfxca.cpp index 57eb96b1..06128f32 100644 --- a/src/ext/NetFx/ca/netfxca.cpp +++ b/src/ext/NetFx/ca/netfxca.cpp | |||
@@ -977,12 +977,20 @@ extern "C" UINT __stdcall DotNetCompatibilityCheck( | |||
977 | WcaLog(LOGMSG_VERBOSE, "Command: %ls %ls", pwzNetCoreCheckFilePath, pwzCommandLine); | 977 | WcaLog(LOGMSG_VERBOSE, "Command: %ls %ls", pwzNetCoreCheckFilePath, pwzCommandLine); |
978 | 978 | ||
979 | hr = ProcExec(pwzNetCoreCheckFilePath, pwzCommandLine, SW_HIDE, &hProcess); | 979 | hr = ProcExec(pwzNetCoreCheckFilePath, pwzCommandLine, SW_HIDE, &hProcess); |
980 | ExitOnFailure(hr, "failed to run NetCoreCheck from binary '%ls' with command line: %ls %ls", pwzNetCoreCheckBinaryId, pwzNetCoreCheckFilePath, pwzCommandLine); | 980 | if (hr == HRESULT_FROM_WIN32(ERROR_EXE_MACHINE_TYPE_MISMATCH) || hr == HRESULT_FROM_WIN32(ERROR_BAD_EXE_FORMAT)) |
981 | { | ||
982 | dwExitCode = 13; | ||
983 | WcaLog(LOGMSG_VERBOSE, "NetCoreCheck executable for platform %ls is not compatible with current OS", pwzPlatform); | ||
984 | } | ||
985 | else | ||
986 | { | ||
987 | ExitOnFailure(hr, "failed to run NetCoreCheck from binary '%ls' with command line: %ls %ls", pwzNetCoreCheckBinaryId, pwzNetCoreCheckFilePath, pwzCommandLine); | ||
981 | 988 | ||
982 | hr = ProcWaitForCompletion(hProcess, INFINITE, &dwExitCode); | 989 | hr = ProcWaitForCompletion(hProcess, INFINITE, &dwExitCode); |
983 | ExitOnFailure(hr, "failed to finish NetCoreCheck from binary '%ls' with command line: %ls %ls", pwzNetCoreCheckBinaryId, pwzNetCoreCheckFilePath, pwzCommandLine); | 990 | ExitOnFailure(hr, "failed to finish NetCoreCheck from binary '%ls' with command line: %ls %ls", pwzNetCoreCheckBinaryId, pwzNetCoreCheckFilePath, pwzCommandLine); |
984 | WcaLog(LOGMSG_VERBOSE, "Exit code: %lu", dwExitCode); | 991 | WcaLog(LOGMSG_VERBOSE, "Exit code: %lu", dwExitCode); |
985 | ReleaseHandle(hProcess); | 992 | ReleaseHandle(hProcess); |
993 | } | ||
986 | 994 | ||
987 | hr = WcaSetIntProperty(pwzProperty, dwExitCode); | 995 | hr = WcaSetIntProperty(pwzProperty, dwExitCode); |
988 | ExitOnFailure(hr, "failed to set NetCoreCheck result in %ls", pwzProperty); | 996 | ExitOnFailure(hr, "failed to set NetCoreCheck result in %ls", pwzProperty); |