diff --git a/ep_setup/ep_setup.c b/ep_setup/ep_setup.c index 35ec3d0..827bb43 100644 --- a/ep_setup/ep_setup.c +++ b/ep_setup/ep_setup.c @@ -517,6 +517,32 @@ int WINAPI wWinMain( return !bOk; } +#if defined(_M_X64) + typedef BOOL (WINAPI *IsWow64Process2_t)(HANDLE hProcess, USHORT* pProcessMachine, USHORT* pNativeMachine); + IsWow64Process2_t pfnIsWow64Process2 = (IsWow64Process2_t)GetProcAddress(GetModuleHandleW(L"kernel32.dll"), "IsWow64Process2"); + if (pfnIsWow64Process2) + { + USHORT processMachine, nativeMachine; + if (pfnIsWow64Process2(GetCurrentProcess(), &processMachine, &nativeMachine)) + { + if (nativeMachine == IMAGE_FILE_MACHINE_ARM64) + { + WCHAR szFormat[256]; + szFormat[0] = 0; + int written = LoadStringW(hInstance, IDS_SETUP_UNSUPPORTED_ARCH, szFormat, ARRAYSIZE(szFormat)); + if (written > 0 && written < ARRAYSIZE(szFormat)) + { + WCHAR szMessage[256]; + szMessage[0] = 0; + _swprintf_p(szMessage, ARRAYSIZE(szMessage), szFormat, L"ARM64", L"x64"); + MessageBoxW(NULL, szMessage, _T(PRODUCT_NAME), MB_OK | MB_ICONERROR); + } + exit(0); + } + } + } +#endif + WCHAR wszOwnPath[MAX_PATH]; ZeroMemory(wszOwnPath, ARRAYSIZE(wszOwnPath)); if (!GetModuleFileNameW(NULL, wszOwnPath, ARRAYSIZE(wszOwnPath))) diff --git a/ep_setup/resources/ep_setup.rc b/ep_setup/resources/ep_setup.rc index 1748fb6..ce278c1 100644 --- a/ep_setup/resources/ep_setup.rc +++ b/ep_setup/resources/ep_setup.rc @@ -68,11 +68,11 @@ BEGIN BEGIN BLOCK "040904b0" BEGIN - VALUE "CompanyName", "VALINET Solutions SRL" + VALUE "CompanyName", "ExplorerPatcher Developers" VALUE "FileDescription", "ExplorerPatcher Setup Program" VER_FILE_STRING VALUE "InternalName", "ep_setup.exe" - VALUE "LegalCopyright", "Copyright (C) 2006-2024 VALINET Solutions SRL. All rights reserved." + VALUE "LegalCopyright", "(C) 2021-2024 ExplorerPatcher Developers. All rights reserved." VALUE "OriginalFilename", "ep_setup.exe" VALUE "ProductName", "ExplorerPatcher" VER_PRODUCT_STRING @@ -126,7 +126,7 @@ IDR_EP_TASKBAR_5 RCDATA "..\\build\\Release\\x64\\ep_taskbar. #elif defined(PLATFORM_ARM64) -IDR_EP_ARM64 RCDATA "..\\build\\Release\\ARM64\\ExplorerPatcher.arm64.dll" +IDR_EP_AMD64 RCDATA "..\\build\\Release\\ARM64\\ExplorerPatcher.arm64.dll" IDR_EP_DWM RCDATA "..\\build\\Release\\ARM64\\ep_dwm.exe" diff --git a/ep_setup/resources/lang/ep_setup.en-US.rc b/ep_setup/resources/lang/ep_setup.en-US.rc index b56cc6b..22fd6b2 100644 --- a/ep_setup/resources/lang/ep_setup.en-US.rc +++ b/ep_setup/resources/lang/ep_setup.en-US.rc @@ -5,6 +5,7 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US STRINGTABLE BEGIN + IDS_SETUP_UNSUPPORTED_ARCH "Please run the %1$s version of the setup file on %1$s devices. This setup file is only for %2$s devices." IDS_SETUP_UNINSTALL_PROMPT "Are you sure you want to remove ExplorerPatcher from your PC?" IDS_SETUP_INSTALL_LOGOFF "In order to install, you will be automatically signed out of Windows. ExplorerPatcher will be ready for use when you sign back in.\n\nDo you want to continue?" IDS_SETUP_UNINSTALL_LOGOFF "To complete the uninstallation, you will be automatically signed out of Windows.\n\nDo you want to continue?" diff --git a/ep_setup/resources/resource.h b/ep_setup/resources/resource.h index 4c149b2..66fe1c1 100644 --- a/ep_setup/resources/resource.h +++ b/ep_setup/resources/resource.h @@ -15,12 +15,13 @@ #define IDR_EP_TASKBAR_4 112 #define IDR_EP_TASKBAR_5 113 -#define IDS_SETUP_UNINSTALL_PROMPT 301 -#define IDS_SETUP_INSTALL_LOGOFF 302 -#define IDS_SETUP_UNINSTALL_LOGOFF 303 -#define IDS_SETUP_UNINSTALL_RESTART 304 -#define IDS_SETUP_UNINSTALL_FINISH 305 -#define IDS_SETUP_FAILED 306 +#define IDS_SETUP_UNSUPPORTED_ARCH 301 +#define IDS_SETUP_UNINSTALL_PROMPT 302 +#define IDS_SETUP_INSTALL_LOGOFF 303 +#define IDS_SETUP_UNINSTALL_LOGOFF 304 +#define IDS_SETUP_UNINSTALL_RESTART 305 +#define IDS_SETUP_UNINSTALL_FINISH 306 +#define IDS_SETUP_FAILED 307 // Next default values for new objects