From f6f6d899f2935219c384ae23ceb329e1a7eeeacc Mon Sep 17 00:00:00 2001 From: Amrsatrio Date: Tue, 7 Nov 2023 18:46:17 +0700 Subject: [PATCH 01/12] GUI: Begin decoupling into ep_gui --- ExplorerPatcher/ExplorerPatcher.rc | Bin 36132 -> 35872 bytes ExplorerPatcher/ExplorerPatcher.vcxproj | 7 ------- .../ExplorerPatcher.vcxproj.filters | 12 ------------ ExplorerPatcher/dllmain.c | 1 - ExplorerPatcher/resource.h | 2 -- {ExplorerPatcher => ep_gui}/GUI.c | 0 {ExplorerPatcher => ep_gui}/GUI.h | 0 .../resources}/settings.reg | 0 .../resources}/settings10.reg | 0 9 files changed, 22 deletions(-) rename {ExplorerPatcher => ep_gui}/GUI.c (100%) rename {ExplorerPatcher => ep_gui}/GUI.h (100%) rename {ExplorerPatcher => ep_gui/resources}/settings.reg (100%) rename {ExplorerPatcher => ep_gui/resources}/settings10.reg (100%) diff --git a/ExplorerPatcher/ExplorerPatcher.rc b/ExplorerPatcher/ExplorerPatcher.rc index 3e006d955d5f02d833343a84d4169c9c6cc2a245..feff20caa72201bc1782c2ef469d82b3330d9add 100644 GIT binary patch delta 14 WcmZ27i)q0OrVSnfn|%atR09Akw*}?^ delta 130 zcmZ25gK5burVSnfyzUI148aT`3_%Q$42F{#xy2{v2pE|cGo&(<0AVIW9z!}qF@qjM q5l|$ZL5YEvfeWa^1*kqAh+P?w^&7$T%cAQyWH3OOvDsYUWi - - true - true - true @@ -322,7 +318,6 @@ - @@ -344,8 +339,6 @@ - - diff --git a/ExplorerPatcher/ExplorerPatcher.vcxproj.filters b/ExplorerPatcher/ExplorerPatcher.vcxproj.filters index 1cb4c14aa..c4be60439 100644 --- a/ExplorerPatcher/ExplorerPatcher.vcxproj.filters +++ b/ExplorerPatcher/ExplorerPatcher.vcxproj.filters @@ -60,9 +60,6 @@ Header Files - - Header Files - Header Files @@ -166,9 +163,6 @@ Source Files - - Source Files - Source Files @@ -219,12 +213,6 @@ - - Settings - - - Settings - \ No newline at end of file diff --git a/ExplorerPatcher/dllmain.c b/ExplorerPatcher/dllmain.c index 48b2a5d5b..4a37f1e7b 100644 --- a/ExplorerPatcher/dllmain.c +++ b/ExplorerPatcher/dllmain.c @@ -208,7 +208,6 @@ BOOL g_bIsDesktopRaised = FALSE; #include "ArchiveMenu.h" #include "StartupSound.h" #include "StartMenu.h" -#include "GUI.h" #include "TaskbarCenter.h" #include "../libs/sws/SimpleWindowSwitcher/sws_WindowSwitcher.h" #endif diff --git a/ExplorerPatcher/resource.h b/ExplorerPatcher/resource.h index 2e86782dd..12163a73a 100644 --- a/ExplorerPatcher/resource.h +++ b/ExplorerPatcher/resource.h @@ -2,7 +2,6 @@ // Microsoft Visual C++ generated include file. // Used by ExplorerPatcher.rc // -#define IDR_REGISTRY1 101 #define IDS_PRODUCTNAME 102 #define IDS_COPYRIGHT 103 #define IDS_VERSION 104 @@ -15,7 +14,6 @@ #define IDS_UNINSTALL_SUCCESS_TEXT 111 #define IDS_UNINSTALL_ERROR_TEXT 112 #define IDS_OPERATION_NONE 113 -#define IDR_REGISTRY2 114 #define IDR_REFRESHEDSTYLES_XBF 115 #define IDS_DRIVECATEGORY_HARDDISKDRIVES 40000 #define IDS_DRIVECATEGORY_REMOVABLESTORAGE 40001 diff --git a/ExplorerPatcher/GUI.c b/ep_gui/GUI.c similarity index 100% rename from ExplorerPatcher/GUI.c rename to ep_gui/GUI.c diff --git a/ExplorerPatcher/GUI.h b/ep_gui/GUI.h similarity index 100% rename from ExplorerPatcher/GUI.h rename to ep_gui/GUI.h diff --git a/ExplorerPatcher/settings.reg b/ep_gui/resources/settings.reg similarity index 100% rename from ExplorerPatcher/settings.reg rename to ep_gui/resources/settings.reg diff --git a/ExplorerPatcher/settings10.reg b/ep_gui/resources/settings10.reg similarity index 100% rename from ExplorerPatcher/settings10.reg rename to ep_gui/resources/settings10.reg From 639d7aa5f1c79ab386542fe1256ac0b8b0666374 Mon Sep 17 00:00:00 2001 From: Amrsatrio Date: Wed, 8 Nov 2023 02:11:48 +0700 Subject: [PATCH 02/12] GUI: Decoupled into ep_gui and added support for localization --- ExplorerPatcher.sln | 13 + ExplorerPatcher/ExplorerPatcher.rc | Bin 35872 -> 34968 bytes ExplorerPatcher/dllmain.c | 405 +++++++---- ExplorerPatcher/resource.h | 6 - ExplorerPatcher/utility.c | 30 +- ep_gui/GUI.c | 271 +++----- ep_gui/GUI.h | 16 +- ep_gui/dllmain.cpp | 30 + ep_gui/ep_gui.vcxproj | 137 ++++ ep_gui/packages.config | 6 + ep_gui/pch.cpp | 1 + ep_gui/pch.h | 1 + ep_gui/resources/EPCrashMessageResources.h | 9 + ep_gui/resources/EPSettingsResources.h | 384 +++++++++++ ep_gui/resources/ep_gui.rc | 121 ++++ ep_gui/resources/lang/ep_gui.en-US.rc | 405 +++++++++++ ep_gui/resources/resource.h | 24 + ep_gui/resources/settings.reg | 757 ++++++++++----------- ep_gui/resources/settings10.reg | 608 ++++++++--------- ep_setup/ep_setup.c | 8 +- ep_setup/ep_setup.rc | 2 + ep_setup/ep_setup_debug.rc | 2 + ep_setup/resource.h | 1 + 23 files changed, 2185 insertions(+), 1052 deletions(-) create mode 100644 ep_gui/dllmain.cpp create mode 100644 ep_gui/ep_gui.vcxproj create mode 100644 ep_gui/packages.config create mode 100644 ep_gui/pch.cpp create mode 100644 ep_gui/pch.h create mode 100644 ep_gui/resources/EPCrashMessageResources.h create mode 100644 ep_gui/resources/EPSettingsResources.h create mode 100644 ep_gui/resources/ep_gui.rc create mode 100644 ep_gui/resources/lang/ep_gui.en-US.rc create mode 100644 ep_gui/resources/resource.h diff --git a/ExplorerPatcher.sln b/ExplorerPatcher.sln index 471367cce..dfdecf9bd 100644 --- a/ExplorerPatcher.sln +++ b/ExplorerPatcher.sln @@ -19,6 +19,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ep_setup", "ep_setup\ep_set {314A50C1-F0A0-4D0C-89E1-AD8F3951043E} = {314A50C1-F0A0-4D0C-89E1-AD8F3951043E} {6BF03EEA-200A-4698-9555-057DD52B0C78} = {6BF03EEA-200A-4698-9555-057DD52B0C78} {DB3E4319-2969-42B6-B7E8-BB57AA8C9FA9} = {DB3E4319-2969-42B6-B7E8-BB57AA8C9FA9} + {2351A0DF-782C-4D74-85B7-0847D245D6B4} = {2351A0DF-782C-4D74-85B7-0847D245D6B4} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ep_setup_patch", "ep_setup_patch\ep_setup_patch.vcxproj", "{0C13E5F3-106B-4836-A7C2-8E5808A6ED78}" @@ -44,6 +45,12 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ep_extra_valinet.win7alttab {93FA47CC-7753-4F86-B583-69048F51C5AB} = {93FA47CC-7753-4F86-B583-69048F51C5AB} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ep_gui", "ep_gui\ep_gui.vcxproj", "{2351A0DF-782C-4D74-85B7-0847D245D6B4}" + ProjectSection(ProjectDependencies) = postProject + {314A50C1-F0A0-4D0C-89E1-AD8F3951043E} = {314A50C1-F0A0-4D0C-89E1-AD8F3951043E} + {AF02ABAC-EAEB-471C-9957-73D430B8B4DE} = {AF02ABAC-EAEB-471C-9957-73D430B8B4DE} + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|amd64 = Debug|amd64 @@ -120,6 +127,12 @@ Global {A66C5F27-DBF8-45A4-BDF3-BA54D8D82D0F}.Release|amd64.ActiveCfg = Release|x64 {A66C5F27-DBF8-45A4-BDF3-BA54D8D82D0F}.Release|amd64.Build.0 = Release|x64 {A66C5F27-DBF8-45A4-BDF3-BA54D8D82D0F}.Release|IA-32.ActiveCfg = Release|Win32 + {2351A0DF-782C-4D74-85B7-0847D245D6B4}.Debug|amd64.ActiveCfg = Debug|x64 + {2351A0DF-782C-4D74-85B7-0847D245D6B4}.Debug|amd64.Build.0 = Debug|x64 + {2351A0DF-782C-4D74-85B7-0847D245D6B4}.Debug|IA-32.ActiveCfg = Debug|x64 + {2351A0DF-782C-4D74-85B7-0847D245D6B4}.Release|amd64.ActiveCfg = Release|x64 + {2351A0DF-782C-4D74-85B7-0847D245D6B4}.Release|amd64.Build.0 = Release|x64 + {2351A0DF-782C-4D74-85B7-0847D245D6B4}.Release|IA-32.ActiveCfg = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/ExplorerPatcher/ExplorerPatcher.rc b/ExplorerPatcher/ExplorerPatcher.rc index feff20caa72201bc1782c2ef469d82b3330d9add..63aa28a0c5cc492ad6e5df3beff22036aafd6ef1 100644 GIT binary patch delta 14 WcmZ25gK5S@rVTbin~#XblmP%NZUw>s delta 575 zcmZ9J&q@MO6vjV=C@7;*%tZ);;G%_sdp9XI2BA^YNHCk3X3#0q@ZZo%dW5fl`md+0d^0zoW{!k-fs6{SCn7%th@LHB=T_6 diff --git a/ExplorerPatcher/dllmain.c b/ExplorerPatcher/dllmain.c index 4a37f1e7b..3c7714172 100644 --- a/ExplorerPatcher/dllmain.c +++ b/ExplorerPatcher/dllmain.c @@ -51,6 +51,7 @@ RTL_OSVERSIONINFOW global_rovi; DWORD32 global_ubr; #endif #include +#include "../ep_gui/resources/EPCrashMessageResources.h" #define WINX_ADJUST_X 5 #define WINX_ADJUST_Y 5 @@ -2435,7 +2436,7 @@ LRESULT CALLBACK Shell_TrayWndMouseProc( return CallNextHookEx(Shell_TrayWndMouseHook, nCode, wParam, lParam); } -PBYTE g_pTrayUIHost; +struct ITrayUIHost* g_pTrayUIHost; INT64 Shell_TrayWndSubclassProc( _In_ HWND hWnd, @@ -2521,8 +2522,8 @@ INT64 Shell_TrayWndSubclassProc( if (g_pTrayUIHost) { void** pTrayUIHostVtbl = *(void***)g_pTrayUIHost; - BOOL (*ShouldDeleteContextMenuUndo)(PBYTE) = pTrayUIHostVtbl[13]; - UINT (*GetContextMenuUndoResourceId)(PBYTE) = pTrayUIHostVtbl[14]; + BOOL(*ShouldDeleteContextMenuUndo)(struct ITrayUIHost*) = pTrayUIHostVtbl[13]; + UINT(*GetContextMenuUndoResourceId)(struct ITrayUIHost*) = pTrayUIHostVtbl[14]; if (ShouldDeleteContextMenuUndo(g_pTrayUIHost)) { @@ -11074,6 +11075,240 @@ BOOL FixStartMenuAnimation(LPMODULEINFO mi) #pragma endregion +#pragma region "Crash counter system" +#ifdef _WIN64 +typedef struct CrashCounterSettings +{ + BOOL bDisabled; + int counter; + int thresholdTime; + int threshold; +} CrashCounterSettings; + +void GetCrashCounterSettings(CrashCounterSettings* out) +{ + out->bDisabled = FALSE; + out->counter = 0; + out->thresholdTime = 10000; + out->threshold = 3; + + DWORD dwTCSize = sizeof(DWORD); + RegGetValueW(HKEY_CURRENT_USER, _T(REGPATH), L"CrashCounterDisabled", RRF_RT_DWORD, NULL, &out->bDisabled, &dwTCSize); + if (out->bDisabled != FALSE && out->bDisabled != TRUE) out->bDisabled = FALSE; + + dwTCSize = sizeof(DWORD); + RegGetValueW(HKEY_CURRENT_USER, _T(REGPATH), L"CrashCounter", RRF_RT_DWORD, NULL, &out->counter, &dwTCSize); + if (out->counter < 0) out->counter = 0; + + dwTCSize = sizeof(DWORD); + RegGetValueW(HKEY_CURRENT_USER, _T(REGPATH), L"CrashThresholdTime", RRF_RT_DWORD, NULL, &out->thresholdTime, &dwTCSize); + if (out->thresholdTime < 100 || out->thresholdTime > 60000) out->thresholdTime = 10000; + + dwTCSize = sizeof(DWORD); + RegGetValueW(HKEY_CURRENT_USER, _T(REGPATH), L"CrashCounterThreshold", RRF_RT_DWORD, NULL, &out->threshold, &dwTCSize); + if (out->threshold <= 1 || out->threshold >= 10) out->threshold = 3; +} + +HRESULT InformUserAboutCrashCallback(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam, LONG_PTR lpRefData) +{ + if (msg == TDN_HYPERLINK_CLICKED) + { + wchar_t* link = (wchar_t*)lParam; + if (wcschr(link, L'\'')) + { + size_t len = wcslen(link); + for (size_t i = 0; i < len; ++i) + { + if (link[i] == L'\'') + link[i] = L'"'; + } + STARTUPINFO si; + PROCESS_INFORMATION pi; + ZeroMemory(&si, sizeof(si)); + si.cb = sizeof(si); + ZeroMemory(&pi, sizeof(pi)); + if (CreateProcessW(NULL, link, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi)) + { + CloseHandle(pi.hProcess); + CloseHandle(pi.hThread); + } + for (size_t i = 0; i < len; ++i) + { + if (link[i] == L'"') + link[i] = L'\''; + } + } + else if (!wcsncmp(link, L"eplink://update", 15)) + { + if (!wcsncmp(link, L"eplink://update/stable", 22)) + { + DWORD no = 0; + RegSetKeyValueW(HKEY_CURRENT_USER, _T(REGPATH), L"UpdatePreferStaging", REG_DWORD, &no, sizeof(DWORD)); + } + else if (!wcsncmp(link, L"eplink://update/staging", 23)) + { + DWORD yes = 1; + RegSetKeyValueW(HKEY_CURRENT_USER, _T(REGPATH), L"UpdatePreferStaging", REG_DWORD, &yes, sizeof(DWORD)); + } + SetLastError(0); + HANDLE sigInstallUpdates = CreateEventW(NULL, FALSE, FALSE, L"EP_Ev_InstallUpdates_" _T(EP_CLSID)); + if (sigInstallUpdates && GetLastError() == ERROR_ALREADY_EXISTS) + { + SetEvent(sigInstallUpdates); + } + else + { + CreateThread(NULL, 0, CheckForUpdatesThread, 0, 0, NULL); + Sleep(100); + SetLastError(0); + sigInstallUpdates = CreateEventW(NULL, FALSE, FALSE, L"EP_Ev_InstallUpdates_" _T(EP_CLSID)); + if (sigInstallUpdates && GetLastError() == ERROR_ALREADY_EXISTS) + { + SetEvent(sigInstallUpdates); + } + } + } + else + { + ShellExecuteW(NULL, L"open", link, L"", NULL, SW_SHOWNORMAL); + } + return S_FALSE; + } + return S_OK; + +} + +DWORD InformUserAboutCrash(LPVOID unused) +{ + CrashCounterSettings cfg; + GetCrashCounterSettings(&cfg); + + wchar_t epGuiPath[MAX_PATH]; + ZeroMemory(epGuiPath, sizeof(epGuiPath)); + SHGetFolderPathW(NULL, SPECIAL_FOLDER, NULL, SHGFP_TYPE_CURRENT, epGuiPath); + wcscat_s(epGuiPath, MAX_PATH, _T(APP_RELATIVE_PATH) L"\\ep_gui.dll"); + HMODULE hEPGui = LoadLibraryExW(epGuiPath, NULL, LOAD_LIBRARY_AS_DATAFILE); + if (!hEPGui) + { + return 0; // Can't load the strings, nothing to display + } + + wchar_t title[100]; + LoadStringW(hEPGui, IDS_CRASH_TITLE, title, ARRAYSIZE(title)); + + wchar_t times[32]; + ZeroMemory(times, sizeof(times)); + if (cfg.threshold == 1) + { + LoadStringW(hEPGui, IDS_CRASH_ONCE, times, ARRAYSIZE(times)); + } + else + { + wchar_t format[32]; + if (LoadStringW(hEPGui, IDS_CRASH_MULTIPLE, format, ARRAYSIZE(format)) != 0) + { + swprintf_s(times, ARRAYSIZE(times), format, cfg.threshold); + } + } + + wchar_t uninstallLink[MAX_PATH]; + ZeroMemory(uninstallLink, sizeof(uninstallLink)); + uninstallLink[0] = L'\''; + SHGetFolderPathW(NULL, SPECIAL_FOLDER, NULL, SHGFP_TYPE_CURRENT, uninstallLink + 1); + wcscat_s(uninstallLink, MAX_PATH, _T(APP_RELATIVE_PATH) L"\\" _T(SETUP_UTILITY_NAME) L"' /uninstall"); + + wchar_t bodyFormat[10000]; + if (LoadStringW(hEPGui, IDS_CRASH_BODY, bodyFormat, ARRAYSIZE(bodyFormat)) == 0) + { + FreeLibrary(hEPGui); + return 0; + } + + wchar_t msg[10000]; + _swprintf_p(msg, ARRAYSIZE(msg), bodyFormat, + times, cfg.thresholdTime / 1000, // 1 & 2: (once|X times) in less than Y seconds + L"eplink://update", // 3: [update ExplorerPatcher and restart File Explorer] + L"https://github.com/valinet/ExplorerPatcher/releases", // 4: [view releases] + L"https://github.com/valinet/ExplorerPatcher/discussions/1102", // 5: [check the current status] + L"https://github.com/valinet/ExplorerPatcher/discussions", // 6: [discuss] + L"https://github.com/valinet/ExplorerPatcher/issues", // 7: [review the latest issues] + uninstallLink // 8: [uninstall ExplorerPatcher] + ); + + wchar_t dismiss[32]; + LoadStringW(hEPGui, IDS_CRASH_DISMISS, dismiss, ARRAYSIZE(dismiss)); + + TASKDIALOG_BUTTON buttons[1]; + buttons[0].nButtonID = IDNO; + buttons[0].pszButtonText = dismiss; + + TASKDIALOGCONFIG td; + ZeroMemory(&td, sizeof(td)); + td.cbSize = sizeof(TASKDIALOGCONFIG); + td.hInstance = hModule; + td.hwndParent = NULL; + td.dwFlags = TDF_SIZE_TO_CONTENT | TDF_ENABLE_HYPERLINKS; + td.pszWindowTitle = L"ExplorerPatcher"; + td.pszMainInstruction = title; + td.pszContent = msg; + td.cButtons = ARRAYSIZE(buttons); + td.pButtons = buttons; + td.cRadioButtons = 0; + td.pRadioButtons = NULL; + td.cxWidth = 0; + td.pfCallback = InformUserAboutCrashCallback; + + HMODULE hComCtl32 = NULL; + HRESULT(*pfTaskDialogIndirect)(const TASKDIALOGCONFIG*, int*, int*, BOOL*) = NULL; + int res = td.nDefaultButton; + if (!(hComCtl32 = GetModuleHandleA("Comctl32.dll")) || + !(pfTaskDialogIndirect = GetProcAddress(hComCtl32, "TaskDialogIndirect")) || + FAILED(pfTaskDialogIndirect(&td, &res, NULL, NULL))) + { + wcscat_s(msg, 10000, L" Would you like to open the ExplorerPatcher status web page on GitHub in your default browser?"); + res = MessageBoxW(NULL, msg, L"ExplorerPatcher", MB_ICONASTERISK | MB_YESNO); + } + if (res == IDYES) + { + ShellExecuteW(NULL, L"open", L"https://github.com/valinet/ExplorerPatcher/discussions/1102", L"", NULL, SW_SHOWNORMAL); + } + FreeLibrary(hEPGui); + return 0; +} + +DWORD WINAPI ClearCrashCounter(INT64 timeout) +{ + Sleep(timeout); + DWORD zero = 0; + RegSetKeyValueW(HKEY_CURRENT_USER, _T(REGPATH), L"CrashCounter", REG_DWORD, &zero, sizeof(DWORD)); + return 0; +} + +BOOL CrashCounterHandleEntryPoint() +{ + CrashCounterSettings cfg; + GetCrashCounterSettings(&cfg); + if (!cfg.bDisabled) + { + // Ctrl + Shift + Alt + BOOL bKeyCombinationTriggered = GetAsyncKeyState(VK_CONTROL) & 0x8000 && GetAsyncKeyState(VK_SHIFT) & 0x8000 && GetAsyncKeyState(VK_MENU) & 0x8000; + if (cfg.counter >= cfg.threshold || bKeyCombinationTriggered) + { + cfg.counter = 0; + RegSetKeyValueW(HKEY_CURRENT_USER, _T(REGPATH), L"CrashCounter", REG_DWORD, &cfg.counter, sizeof(DWORD)); + SHCreateThread(InformUserAboutCrash, NULL, 0, NULL); + return TRUE; + } + cfg.counter++; + RegSetKeyValueW(HKEY_CURRENT_USER, _T(REGPATH), L"CrashCounter", REG_DWORD, &cfg.counter, sizeof(DWORD)); + SHCreateThread(ClearCrashCounter, cfg.thresholdTime, 0, NULL); + } + return FALSE; +} +#endif +#pragma endregion + + DWORD Inject(BOOL bIsExplorer) { #if defined(DEBUG) | defined(_DEBUG) @@ -11482,7 +11717,7 @@ DWORD Inject(BOOL bIsExplorer) // Find a pointer to ITrayUIHost needed to have a working Windows 10 taskbar context menu on Windows 11 taskbar // Ref: CTray::Init() // 4C 8D 05 ? ? ? ? 48 8D 0D ? ? ? ? E8 ? ? ? ? 48 8B - // ^^^^^^^ + // ^^^^^^^ ^^^^^^^ PBYTE match = FindPattern( hExplorer, miExplorer.SizeOfImage, @@ -11491,9 +11726,12 @@ DWORD Inject(BOOL bIsExplorer) ); if (match) { - match += 7; + match += 7; // Point to 48 g_pTrayUIHost = match + 7 + *(int*)(match + 3); - printf("ITrayUIHost = %llX\n", g_pTrayUIHost - (PBYTE)hExplorer); + // match += 7; // Point to E8 + // explorer_TrayUI_CreateInstanceFunc = match + 5 + *(int*)(match + 1); + printf("ITrayUIHost = %llX\n", (PBYTE)g_pTrayUIHost - (PBYTE)hExplorer); + // printf("explorer.exe!TrayUI_CreateInstance() = %llX\n", (PBYTE)explorer_TrayUI_CreateInstanceFunc - (PBYTE)hExplorer); } else { @@ -11722,11 +11960,9 @@ DWORD Inject(BOOL bIsExplorer) { // Make sure crash counter is enabled. If one of the patches make Explorer crash while the start menu is open, // we don't want to softlock the user. The system reopens the start menu if Explorer terminates while it's open. - DWORD crashCounterDisabled = 0, dwTCSize = sizeof(DWORD); - RegGetValueW(HKEY_CURRENT_USER, _T(REGPATH), L"CrashCounterDisabled", RRF_RT_DWORD, NULL, &crashCounterDisabled, &dwTCSize); dwTCSize = sizeof(DWORD); - if (crashCounterDisabled != 0 && crashCounterDisabled != 1) crashCounterDisabled = 0; - - if (!crashCounterDisabled) + CrashCounterSettings cfg; + GetCrashCounterSettings(&cfg); + if (!cfg.bDisabled) { FixStartMenuAnimation(&miTwinuiPcshell); } @@ -13659,93 +13895,6 @@ void InjectShellExperienceHostFor22H2OrHigher() { #endif } -#ifdef _WIN64 -HRESULT InformUserAboutCrashCallback(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam, LONG_PTR lpRefData) { - if (msg == TDN_HYPERLINK_CLICKED) { - if (wcschr(lParam, L'\'')) { - for (int i = 0; i < wcslen(lParam); ++i) if (*(((wchar_t*)lParam) + i) == L'\'') *(((wchar_t*)lParam) + i) = L'"'; - STARTUPINFO si; - PROCESS_INFORMATION pi; - ZeroMemory(&si, sizeof(si)); - si.cb = sizeof(si); - ZeroMemory(&pi, sizeof(pi)); - if (CreateProcessW(NULL, lParam, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi)) { - CloseHandle(pi.hProcess); - CloseHandle(pi.hThread); - } - for (int i = 0; i < wcslen(lParam); ++i) if (*(((wchar_t*)lParam) + i) == L'"') *(((wchar_t*)lParam) + i) = L'\''; - } - else if (!wcsncmp(lParam, L"eplink://update", 15)) { - if (!wcsncmp(lParam, L"eplink://update/stable", 22)) { - DWORD no = 0; - RegSetKeyValueW(HKEY_CURRENT_USER, _T(REGPATH), L"UpdatePreferStaging", REG_DWORD, &no, sizeof(DWORD)); - } else if (!wcsncmp(lParam, L"eplink://update/staging", 23)) { - DWORD yes = 1; - RegSetKeyValueW(HKEY_CURRENT_USER, _T(REGPATH), L"UpdatePreferStaging", REG_DWORD, &yes, sizeof(DWORD)); - } - SetLastError(0); - HANDLE sigInstallUpdates = CreateEventW(NULL, FALSE, FALSE, L"EP_Ev_InstallUpdates_" _T(EP_CLSID)); - if (sigInstallUpdates && GetLastError() == ERROR_ALREADY_EXISTS) { - SetEvent(sigInstallUpdates); - } - else { - CreateThread(NULL, 0, CheckForUpdatesThread, 0, 0, NULL); - Sleep(100); - SetLastError(0); - sigInstallUpdates = CreateEventW(NULL, FALSE, FALSE, L"EP_Ev_InstallUpdates_" _T(EP_CLSID)); - if (sigInstallUpdates && GetLastError() == ERROR_ALREADY_EXISTS) { - SetEvent(sigInstallUpdates); - } - } - } - else ShellExecuteW(NULL, L"open", lParam, L"", NULL, SW_SHOWNORMAL); - return S_FALSE; - } - return S_OK; - -} - -DWORD InformUserAboutCrash(LPVOID msg) { - TASKDIALOG_BUTTON buttons[1]; - buttons[0].nButtonID = IDNO; - buttons[0].pszButtonText = L"Dismiss"; - - TASKDIALOGCONFIG td; - ZeroMemory(&td, sizeof(TASKDIALOGCONFIG)); - td.cbSize = sizeof(TASKDIALOGCONFIG); - td.hInstance = hModule; - td.hwndParent = NULL; - td.dwFlags = TDF_SIZE_TO_CONTENT | TDF_ENABLE_HYPERLINKS; - td.pszWindowTitle = L"ExplorerPatcher"; - td.pszMainInstruction = L"Unfortunately, File Explorer is crashing :("; - td.pszContent = msg; - td.cButtons = sizeof buttons / sizeof buttons[0]; - td.pButtons = buttons; - td.cRadioButtons = 0; - td.pRadioButtons = NULL; - td.cxWidth = 0; - td.pfCallback = InformUserAboutCrashCallback; - - HMODULE hComCtl32 = NULL; - HRESULT(*pfTaskDialogIndirect)(const TASKDIALOGCONFIG*, int*, int*, BOOL*) = NULL; - int res = td.nDefaultButton; - if (!(hComCtl32 = GetModuleHandleA("Comctl32.dll")) || - !(pfTaskDialogIndirect = GetProcAddress(hComCtl32, "TaskDialogIndirect")) || - FAILED(pfTaskDialogIndirect(&td, &res, NULL, NULL))) { - wcscat_s(msg, 10000, L" Would you like to open the ExplorerPatcher status web page on GitHub in your default browser?"); - res = MessageBoxW(NULL, msg, L"ExplorerPatcher", MB_ICONASTERISK | MB_YESNO); - } - if (res == IDYES) ShellExecuteW(NULL, L"open", L"https://github.com/valinet/ExplorerPatcher/discussions/1102", L"", NULL, SW_SHOWNORMAL); - free(msg); -} - -DWORD WINAPI ClearCrashCounter(INT64 timeout) { - Sleep(timeout); - DWORD zero = 0; - RegSetKeyValueW(HKEY_CURRENT_USER, _T(REGPATH), L"CrashCounter", REG_DWORD, &zero, sizeof(DWORD)); -} -#endif - #define DLL_INJECTION_METHOD_DXGI 0 #define DLL_INJECTION_METHOD_COM 1 #define DLL_INJECTION_METHOD_START_INJECTION 2 @@ -13835,52 +13984,11 @@ HRESULT EntryPoint(DWORD dwMethod) { BOOL desktopExists = IsDesktopWindowAlreadyPresent(); #ifdef _WIN64 - if (!desktopExists) { - DWORD crashCounterDisabled = 0, crashCounter = 0, crashThresholdTime = 10000, crashCounterThreshold = 3, dwTCSize = sizeof(DWORD); - RegGetValueW(HKEY_CURRENT_USER, _T(REGPATH), L"CrashCounterDisabled", RRF_RT_DWORD, NULL, &crashCounterDisabled, &dwTCSize); dwTCSize = sizeof(DWORD); - if (crashCounterDisabled != 0 && crashCounterDisabled != 1) crashCounterDisabled = 0; - RegGetValueW(HKEY_CURRENT_USER, _T(REGPATH), L"CrashCounter", RRF_RT_DWORD, NULL, &crashCounter, &dwTCSize); dwTCSize = sizeof(DWORD); - if (crashCounter < 0) crashCounter = 0; - RegGetValueW(HKEY_CURRENT_USER, _T(REGPATH), L"CrashThresholdTime", RRF_RT_DWORD, NULL, &crashThresholdTime, &dwTCSize); dwTCSize = sizeof(DWORD); - if (crashThresholdTime < 100 || crashThresholdTime > 60000) crashThresholdTime = 10000; - RegGetValueW(HKEY_CURRENT_USER, _T(REGPATH), L"CrashCounterThreshold", RRF_RT_DWORD, NULL, &crashCounterThreshold, &dwTCSize); dwTCSize = sizeof(DWORD); - if (crashCounterThreshold <= 1 || crashCounterThreshold >= 10) crashCounterThreshold = 3; - if (!crashCounterDisabled) { - if (crashCounter >= crashCounterThreshold) { - crashCounter = 0; - RegSetKeyValueW(HKEY_CURRENT_USER, _T(REGPATH), L"CrashCounter", REG_DWORD, &crashCounter, sizeof(DWORD)); - wchar_t times[100]; - ZeroMemory(times, sizeof(wchar_t) * 100); - swprintf_s(times, 100, crashCounterThreshold == 1 ? L"once" : L"%d times", crashCounterThreshold); - wchar_t uninstallLink[MAX_PATH]; - ZeroMemory(uninstallLink, sizeof(wchar_t) * MAX_PATH); - uninstallLink[0] = L'\''; - SHGetFolderPathW(NULL, SPECIAL_FOLDER, NULL, SHGFP_TYPE_CURRENT, uninstallLink + 1); - wcscat_s(uninstallLink, MAX_PATH, _T(APP_RELATIVE_PATH) L"\\" _T(SETUP_UTILITY_NAME) L"' /uninstall"); - wchar_t* msg = calloc(sizeof(wchar_t), 10000); - swprintf_s(msg, 10000, - L"It seems that File Explorer closed unexpectedly %s in less than %d seconds each time when starting up. " - L"This might indicate a problem caused by ExplorerPatcher, which might be unaware of recent changes in Windows, for example " - L"when running on a new OS build.\n" - L"Here are a few recommendations:\n" - L"\u2022 If an updated version is available, you can update ExplorerPatcher and restart File Explorer.\n" - L"\u2022 On GitHub, you can view releases, check the current status, discuss or review the latest issues.\n" - L"\u2022 If you suspect this is not caused by ExplorerPatcher, please uninstall any recently installed shell extensions or similar utilities.\n" - L"\u2022 If no fix is available for the time being, you can uninstall ExplorerPatcher, and then later reinstall it when a fix is published on " - L"GitHub. Rest assured, even if you uninstall, your program configuration will be preserved.\n" - L"\n" - L"I am sorry for the inconvenience this might cause; I am doing my best to try to keep this program updated and working.\n\n" - L"ExplorerPatcher is disabled until the next File Explorer restart, in order to allow you to perform maintenance tasks and take the necessary actions.", - times, crashThresholdTime / 1000, uninstallLink); - SHCreateThread(InformUserAboutCrash, msg, 0, NULL); - IncrementDLLReferenceCount(hModule); - bInstanced = TRUE; - return E_NOINTERFACE; - } - crashCounter++; - RegSetKeyValueW(HKEY_CURRENT_USER, _T(REGPATH), L"CrashCounter", REG_DWORD, &crashCounter, sizeof(DWORD)); - SHCreateThread(ClearCrashCounter, crashThresholdTime, 0, NULL); - } + if (!desktopExists && CrashCounterHandleEntryPoint()) + { + IncrementDLLReferenceCount(hModule); + bInstanced = TRUE; + return E_NOINTERFACE; } #endif Inject(!desktopExists); @@ -13970,3 +14078,12 @@ BOOL WINAPI DllMain( } return TRUE; } + +#ifdef _WIN64 +__declspec(dllexport) int ZZGUI(HWND hWnd, HINSTANCE hInstance, LPSTR lpszCmdLine, int nCmdShow) +{ + // Forward to ep_gui.dll + LaunchPropertiesGUI(hModule); + return 0; +} +#endif diff --git a/ExplorerPatcher/resource.h b/ExplorerPatcher/resource.h index 12163a73a..26e21eff7 100644 --- a/ExplorerPatcher/resource.h +++ b/ExplorerPatcher/resource.h @@ -3,12 +3,6 @@ // Used by ExplorerPatcher.rc // #define IDS_PRODUCTNAME 102 -#define IDS_COPYRIGHT 103 -#define IDS_VERSION 104 -#define IDS_PRODUCTTAG 105 -#define IDS_VISITGITHUB 106 -#define IDS_VISITWEBSITE 107 -#define IDS_LICENSEINFO 108 #define IDS_INSTALL_SUCCESS_TEXT 109 #define IDS_INSTALL_ERROR_TEXT 110 #define IDS_UNINSTALL_SUCCESS_TEXT 111 diff --git a/ExplorerPatcher/utility.c b/ExplorerPatcher/utility.c index d702a0be6..10c14eb71 100644 --- a/ExplorerPatcher/utility.c +++ b/ExplorerPatcher/utility.c @@ -474,30 +474,14 @@ void LaunchPropertiesGUI(HMODULE hModule) { //CreateThread(0, 0, ZZGUI, 0, 0, 0); wchar_t wszPath[MAX_PATH * 2]; - ZeroMemory( - wszPath, - (MAX_PATH * 2) * sizeof(wchar_t) - ); + ZeroMemory(wszPath, ARRAYSIZE(wszPath)); wszPath[0] = '\"'; - GetSystemDirectoryW( - wszPath + 1, - MAX_PATH - ); - wcscat_s( - wszPath, - MAX_PATH * 2, - L"\\rundll32.exe\" \"" - ); - GetModuleFileNameW( - hModule, - wszPath + wcslen(wszPath), - MAX_PATH - ); - wcscat_s( - wszPath, - MAX_PATH * 2, - L"\",ZZGUI" - ); + GetSystemDirectoryW(wszPath + 1, MAX_PATH); + wcscat_s(wszPath, ARRAYSIZE(wszPath), L"\\rundll32.exe\" \""); + SHGetFolderPathW(NULL, SPECIAL_FOLDER, NULL, SHGFP_TYPE_CURRENT, wszPath + wcslen(wszPath)); + wcscat_s(wszPath, ARRAYSIZE(wszPath), _T(APP_RELATIVE_PATH) L"\\ep_gui.dll"); + wcscat_s(wszPath, ARRAYSIZE(wszPath), L"\",ZZGUI"); + wprintf(L"Launching : %s\n", wszPath); STARTUPINFO si; ZeroMemory(&si, sizeof(STARTUPINFO)); diff --git a/ep_gui/GUI.c b/ep_gui/GUI.c index 023e394fe..a5e9eda39 100644 --- a/ep_gui/GUI.c +++ b/ep_gui/GUI.c @@ -11,7 +11,7 @@ void* GUI_FileMapping = NULL; DWORD GUI_FileSize = 0; BOOL g_darkModeEnabled = FALSE; static void(*RefreshImmersiveColorPolicyState)() = NULL; -static BOOL(*ShouldAppsUseDarkMode)() = NULL; +// static BOOL(*ShouldAppsUseDarkMode)() = nullptr; // Already defined in utility.h DWORD dwTaskbarPosition = 3; BOOL gui_bOldTaskbar = TRUE; @@ -838,61 +838,6 @@ LSTATUS GUI_RegQueryValueExW( return lRes; } - -static HRESULT GUI_AboutProc( - HWND hwnd, - UINT uNotification, - WPARAM wParam, - LPARAM lParam, - LONG_PTR lpRefData -) -{ - switch (uNotification) - { - case TDN_BUTTON_CLICKED: - { - if (wParam == IDOK || wParam == IDCANCEL) - { - return S_OK; - } - else if (wParam == IDS_VISITGITHUB) - { - ShellExecuteA( - NULL, - "open", - "https://github.com/valinet/ExplorerPatcher", - NULL, - NULL, - SW_SHOWNORMAL - ); - } - else if (wParam == IDS_VISITWEBSITE) - { - ShellExecuteA( - NULL, - "open", - "https://www.valinet.ro", - NULL, - NULL, - SW_SHOWNORMAL - ); - } - else if (wParam == IDS_LICENSEINFO) - { - ShellExecuteA( - NULL, - "open", - "mailto:valentingabrielradu@gmail.com", - NULL, - NULL, - SW_SHOWNORMAL - ); - } - } - } - return S_OK; -} - static void GUI_SetSection(GUI* _this, BOOL bCheckEnablement, int dwSection) { _this->section = dwSection; @@ -949,6 +894,32 @@ static void GUI_SetSection(GUI* _this, BOOL bCheckEnablement, int dwSection) RegCloseKey(hKey); } +void GUI_SubstituteLocalizedString(wchar_t* str, size_t cch) +{ + // %R:1212% + // ^^^^ The resource ID + wchar_t* begin = wcsstr(str, L"%R:"); + if (!begin) return; + + wchar_t* end = wcschr(begin + 3, L'%'); + if (!end) return; + ++end; // Skip the % + + int resId = _wtoi(begin + 3); + + const wchar_t* localized = NULL; + int numChars = LoadStringW(hModule, resId, (LPWSTR)&localized, 0); + if (numChars == 0) return; + + // Move the end to make space + SIZE_T endLen = wcslen(end); + memmove_s(begin + numChars, cch - (begin - str), end, (endLen + 1) * sizeof(wchar_t)); // Include the null terminator + + // Copy the localized string + memcpy_s(begin, cch - (begin - str), localized, numChars * sizeof(wchar_t)); + // TODO Check if the numbers are okay +} + static BOOL GUI_Build(HDC hDC, HWND hwnd, POINT pt) { GUI* _this; @@ -1031,7 +1002,7 @@ static BOOL GUI_Build(HDC hDC, HWND hwnd, POINT pt) DttOpts.crText = g_darkModeEnabled ? GUI_TEXTCOLOR_DARK : GUI_TEXTCOLOR; DWORD dwTextFlags = DT_SINGLELINE | DT_VCENTER | DT_END_ELLIPSIS; RECT rcText; - DWORD dwMaxHeight = 0, dwMaxWidth = 0; + DWORD dwMaxHeight = 0, dwMaxWidth = (DWORD)(480 * (_this->dpi.x / 96.0)); BOOL bTabOrderHit = FALSE; DWORD dwLeftPad = _this->padding.left + _this->sidebarWidth + _this->padding.right; DWORD dwInitialLeftPad = dwLeftPad; @@ -1207,6 +1178,7 @@ static BOOL GUI_Build(HDC hDC, HWND hwnd, POINT pt) text, MAX_LINE_LENGTH ); + GUI_SubstituteLocalizedString(text, MAX_LINE_LENGTH); if (_this->sectionNames[currentSection + 1][0] == 0) { wcscpy_s(_this->sectionNames[currentSection + 1], 20, text); @@ -1280,33 +1252,6 @@ static BOOL GUI_Build(HDC hDC, HWND hwnd, POINT pt) if (!strncmp(line, ";e ", 3) || !strncmp(line, ";a ", 3) || !strncmp(line, ";T ", 3) || !strncmp(line, ";t ", 3) || !strncmp(line, ";u ", 3) || !strncmp(line, ";M ", 3)) { - if (!strncmp(line, ";t ", 3) || !strncmp(line, ";e ", 3) || !strncmp(line, ";a ", 3)) - { - char* p = strstr(line, "%VERSIONINFORMATIONSTRING%"); - if (p) - { - DWORD dwLeftMost = 0; - DWORD dwSecondLeft = 0; - DWORD dwSecondRight = 0; - DWORD dwRightMost = 0; - - QueryVersionInfo(hModule, VS_VERSION_INFO, &dwLeftMost, &dwSecondLeft, &dwSecondRight, &dwRightMost); - - sprintf_s(p, MAX_PATH, "%d.%d.%d.%d%s", dwLeftMost, dwSecondLeft, dwSecondRight, dwRightMost, -#if defined(DEBUG) | defined(_DEBUG) - " (Debug)" -#else - "" -#endif - ); - } - - p = strstr(line, "%OSVERSIONSTRING%"); - if (p) - { - sprintf_s(p, MAX_PATH, "%d.%d.%d.%d.", global_rovi.dwMajorVersion, global_rovi.dwMinorVersion, global_rovi.dwBuildNumber, global_ubr); - } - } ZeroMemory(text, (MAX_LINE_LENGTH + 3) * sizeof(wchar_t)); MultiByteToWideChar( CP_UTF8, @@ -1342,8 +1287,13 @@ static BOOL GUI_Build(HDC hDC, HWND hwnd, POINT pt) ZeroMemory(wszTime, sizeof(WCHAR) * MAX_PATH); if (GetTimeFormatEx(wszWeatherLanguage[0] ? wszWeatherLanguage : wszLanguage, TIME_NOSECONDS, &stLastUpdate, NULL, wszTime, MAX_PATH)) { - bOk = TRUE; - swprintf_s(text, MAX_LINE_LENGTH, L"Last updated on: %s, %s.", wszDate, wszTime); + wchar_t wszFormat[MAX_PATH]; + int numChars = LoadStringW(hModule, IDS_WEATHER_LASTUPDATE, wszFormat, MAX_PATH); + if (numChars != 0) + { + bOk = TRUE; + swprintf_s(text, MAX_LINE_LENGTH, wszFormat, wszDate, wszTime); + } } } } @@ -1398,6 +1348,46 @@ static BOOL GUI_Build(HDC hDC, HWND hwnd, POINT pt) DWORD dwDataSize = MAX_LINE_LENGTH; RegQueryValueW(HKEY_CURRENT_USER, L"Software\\Classes\\CLSID\\{2cc5ca98-6485-489a-920e-b3e88a6ccce3}\\shell\\SpotlightNext", text, &dwDataSize); } + else if (!wcsncmp(text, L"%VERSIONINFORMATIONSTRING%", 26)) + { + DWORD dwLeftMost = 0; + DWORD dwSecondLeft = 0; + DWORD dwSecondRight = 0; + DWORD dwRightMost = 0; + + QueryVersionInfo(hModule, VS_VERSION_INFO, &dwLeftMost, &dwSecondLeft, &dwSecondRight, &dwRightMost); + + wchar_t wszFormat[MAX_PATH]; + int numChars = LoadStringW(hModule, IDS_ABOUT_VERSION, wszFormat, MAX_PATH); + if (numChars != 0) + { + swprintf_s(text, MAX_LINE_LENGTH, wszFormat, dwLeftMost, dwSecondLeft, dwSecondRight, dwRightMost, +#if defined(DEBUG) | defined(_DEBUG) + L" (Debug)" +#else + L"" +#endif + ); + } + } + else if (!wcsncmp(text, L"%OSVERSIONSTRING%", 17)) + { + wchar_t wszFormat[MAX_PATH]; + int numChars = LoadStringW(hModule, IDS_ABOUT_OS, wszFormat, MAX_PATH); + if (numChars != 0) + { + swprintf_s( + text, MAX_LINE_LENGTH, wszFormat, + IsWindows11() ? L"Windows 11" : L"Windows 10", + global_rovi.dwBuildNumber, + global_ubr + ); + } + } + else + { + GUI_SubstituteLocalizedString(text, MAX_LINE_LENGTH); + } if (bResetLastHeading) { wcscpy_s(lastHeading, MAX_LINE_LENGTH, text); @@ -1848,78 +1838,6 @@ static BOOL GUI_Build(HDC hDC, HWND hwnd, POINT pt) } } } - else if (!strncmp(line + 1, "about", 5)) - { - DWORD dwLeftMost = 0; - DWORD dwSecondLeft = 0; - DWORD dwSecondRight = 0; - DWORD dwRightMost = 0; - - QueryVersionInfo(hModule, VS_VERSION_INFO, &dwLeftMost, &dwSecondLeft, &dwSecondRight, &dwRightMost); - - TCHAR wszIDS_VISITGITHUB[100]; - LoadString(hModule, IDS_VISITGITHUB, wszIDS_VISITGITHUB, 100); - TCHAR wszIDS_VISITWEBSITE[100]; - LoadString(hModule, IDS_VISITWEBSITE, wszIDS_VISITWEBSITE, 100); - TCHAR wszIDS_LICENSEINFO[100]; - LoadString(hModule, IDS_LICENSEINFO, wszIDS_LICENSEINFO, 100); - TCHAR wszIDS_PRODUCTNAME[100]; - LoadString(hModule, IDS_PRODUCTNAME, wszIDS_PRODUCTNAME, 100); - TCHAR wszIDS_VERSION[100]; - LoadString(hModule, IDS_VERSION, wszIDS_VERSION, 100); - TCHAR wszIDS_PRODUCTTAG[406]; - wsprintf(wszIDS_PRODUCTTAG, wszIDS_VERSION, dwLeftMost, dwSecondLeft, dwSecondRight, dwRightMost); - wcscat_s( - wszIDS_PRODUCTTAG, - 406, - L"\r\n" - ); - LoadString(hModule, IDS_COPYRIGHT, wszIDS_PRODUCTTAG + wcslen(wszIDS_PRODUCTTAG), 100); - wcscat_s( - wszIDS_PRODUCTTAG, - 406, - L"\r\n\r\n" - ); - LoadString(hModule, IDS_PRODUCTTAG, wszIDS_PRODUCTTAG + wcslen(wszIDS_PRODUCTTAG), 200); - - TASKDIALOG_BUTTON buttons[3]; - buttons[0].nButtonID = IDS_VISITGITHUB; - buttons[0].pszButtonText = wszIDS_VISITGITHUB; - buttons[1].nButtonID = IDS_VISITWEBSITE; - buttons[1].pszButtonText = wszIDS_VISITWEBSITE; - buttons[2].nButtonID = IDS_LICENSEINFO; - buttons[2].pszButtonText = wszIDS_LICENSEINFO; - - TASKDIALOGCONFIG td; - ZeroMemory(&td, sizeof(TASKDIALOGCONFIG)); - td.cbSize = sizeof(TASKDIALOGCONFIG); - td.hwndParent = hwnd; - td.hInstance = hModule; - td.dwFlags = TDF_ALLOW_DIALOG_CANCELLATION | TDF_SIZE_TO_CONTENT | TDF_USE_COMMAND_LINKS; - td.dwCommonButtons = TDCBF_OK_BUTTON; - td.pszWindowTitle = L" "; - td.pszMainIcon = TD_INFORMATION_ICON; - td.pszMainInstruction = wszIDS_PRODUCTNAME; - td.pszContent = wszIDS_PRODUCTTAG; - td.cButtons = sizeof(buttons) / sizeof(buttons[0]); - td.pButtons = buttons; - td.nDefaultButton = IDOK; - td.cRadioButtons = 0; - td.pRadioButtons = NULL; - td.cxWidth = 0; - td.pszFooter = L""; - td.pfCallback = GUI_AboutProc; - td.lpCallbackData = 0; - int ret; - - // If used directly, StartMenuExperienceHost.exe crashes badly and is unable to start; guess how I know... - (HRESULT(*)(const TASKDIALOGCONFIG*, int*, int*, BOOL*))(GetProcAddress(GetModuleHandleA("Comctl32.dll"), "TaskDialogIndirect"))( - &td, - &ret, - NULL, - NULL - ); - } else if (!strncmp(line + 1, "export", 6)) { WCHAR title[MAX_PATH]; @@ -2283,13 +2201,14 @@ static BOOL GUI_Build(HDC hDC, HWND hwnd, POINT pt) !strncmp(line, ";c ", 3) || !strncmp(line, ";z ", 3) ? strchr(line + 3, ' ') + 1 : line + 3, numChRd - 3, text + 3, - MAX_LINE_LENGTH + MAX_LINE_LENGTH - 3 ); wchar_t* x = wcschr(text, L'\n'); if (x) *x = 0; x = wcschr(text, L'\r'); if (x) *x = 0; + GUI_SubstituteLocalizedString(text + 3, MAX_LINE_LENGTH - 3); if (!strncmp(line, ";w ", 3) || !strncmp(line, ";c ", 3) || !strncmp(line, ";z ", 3) || !strncmp(line, ";b ", 3) || !strncmp(line, ";i ", 3) || !strncmp(line, ";d ", 3) || !strncmp(line, ";v ", 3)) { WCHAR* wszTitle = NULL; @@ -2329,15 +2248,16 @@ static BOOL GUI_Build(HDC hDC, HWND hwnd, POINT pt) p = strchr(p + 1, '\n'); if (p) *p = 0; - wchar_t* miText = malloc((strlen(ln) + 1) * sizeof(wchar_t)); + wchar_t* miText = malloc(MAX_PATH * sizeof(wchar_t)); MultiByteToWideChar( CP_UTF8, MB_PRECOMPOSED, ln, - strlen(ln) + 1, + MAX_PATH, miText, - strlen(ln) + 1 + MAX_PATH ); + GUI_SubstituteLocalizedString(miText, MAX_PATH); MENUITEMINFOW menuInfo; ZeroMemory(&menuInfo, sizeof(MENUITEMINFOW)); @@ -2379,6 +2299,7 @@ static BOOL GUI_Build(HDC hDC, HWND hwnd, POINT pt) wszPrompt, MAX_LINE_LENGTH ); + GUI_SubstituteLocalizedString(wszPrompt, MAX_LINE_LENGTH); numChRd = getline(&l, &bufsiz, f); p = l; p = strchr(p + 1, '\r'); @@ -2393,6 +2314,7 @@ static BOOL GUI_Build(HDC hDC, HWND hwnd, POINT pt) wszFallbackDefault, MAX_LINE_LENGTH ); + GUI_SubstituteLocalizedString(wszFallbackDefault, MAX_LINE_LENGTH); free(l); } numChRd = getline(&line, &bufsiz, f); @@ -2940,31 +2862,23 @@ static BOOL GUI_Build(HDC hDC, HWND hwnd, POINT pt) HANDLE hEvent = CreateEventW(NULL, FALSE, FALSE, L"EP_Ev_CheckForUpdates_" _T(EP_CLSID)); if (hEvent) { - if (GetLastError() != ERROR_ALREADY_EXISTS) - { - CloseHandle(hEvent); - } - else + if (GetLastError() == ERROR_ALREADY_EXISTS) { SetEvent(hEvent); - CloseHandle(hEvent); } + CloseHandle(hEvent); } } - else if(!strcmp(line + 2, ";EP_INSTALL_UPDATES")) + else if (!strcmp(line + 2, ";EP_INSTALL_UPDATES")) { HANDLE hEvent = CreateEventW(NULL, FALSE, FALSE, L"EP_Ev_InstallUpdates_" _T(EP_CLSID)); if (hEvent) { - if (GetLastError() != ERROR_ALREADY_EXISTS) - { - CloseHandle(hEvent); - } - else + if (GetLastError() == ERROR_ALREADY_EXISTS) { SetEvent(hEvent); - CloseHandle(hEvent); } + CloseHandle(hEvent); } } } @@ -3023,7 +2937,12 @@ static BOOL GUI_Build(HDC hDC, HWND hwnd, POINT pt) 1, 0 ); - swprintf(text + 3, MAX_LINE_LENGTH, L"Disable the interaction list for individual apps ( Alt + %c )", key); + wchar_t wszFormat[MAX_PATH]; + int numChars = LoadStringW(hModule, IDS_AT_SWS_NOPERAPP, wszFormat, MAX_PATH); + if (numChars != 0) + { + swprintf(text + 3, MAX_LINE_LENGTH - 3, wszFormat, key); + } } if (tabOrder == _this->tabOrder) { diff --git a/ep_gui/GUI.h b/ep_gui/GUI.h index 78d9b3897..93868aee9 100644 --- a/ep_gui/GUI.h +++ b/ep_gui/GUI.h @@ -20,10 +20,10 @@ processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"") #pragma comment(lib, "UxTheme.lib") #include #pragma comment(lib, "Dwmapi.lib") -#include "resource.h" -#include "getline.h" -#include "fmemopen.h" -#include "utility.h" +#include "resources/resource.h" +#include "../ExplorerPatcher/getline.h" +#include "../ExplorerPatcher/fmemopen.h" +#include "../ExplorerPatcher/utility.h" #include "../ep_weather_host/ep_weather.h" #include "../ep_weather_host/ep_weather_host_h.h" @@ -89,14 +89,6 @@ typedef struct _GUI DWORD last_section; } GUI; -static HRESULT GUI_AboutProc( - HWND hwnd, - UINT uNotification, - WPARAM wParam, - LPARAM lParam, - LONG_PTR lpRefData -); - static BOOL GUI_Build(HDC hDC, HWND hWnd); static LRESULT CALLBACK GUI_WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam); diff --git a/ep_gui/dllmain.cpp b/ep_gui/dllmain.cpp new file mode 100644 index 000000000..6587305b4 --- /dev/null +++ b/ep_gui/dllmain.cpp @@ -0,0 +1,30 @@ +#include + +extern "C" +{ + +HMODULE hModule = nullptr; + +BOOL WINAPI DllMain( + _In_ HINSTANCE hinstDLL, + _In_ DWORD fdwReason, + _In_ LPVOID lpvReserved +) +{ + switch (fdwReason) + { + case DLL_PROCESS_ATTACH: + DisableThreadLibraryCalls(hinstDLL); + hModule = hinstDLL; + break; + case DLL_THREAD_ATTACH: + break; + case DLL_THREAD_DETACH: + break; + case DLL_PROCESS_DETACH: + break; + } + return TRUE; +} + +} diff --git a/ep_gui/ep_gui.vcxproj b/ep_gui/ep_gui.vcxproj new file mode 100644 index 000000000..bcff4f17c --- /dev/null +++ b/ep_gui/ep_gui.vcxproj @@ -0,0 +1,137 @@ + + + + + + Debug + x64 + + + Release + x64 + + + + 17.0 + Win32Proj + {2351a0df-782c-4d74-85b7-0847d245d6b4} + epgui + 10.0 + + + + DynamicLibrary + true + v143 + Unicode + + + DynamicLibrary + false + v143 + true + Unicode + + + + + + + + + + + + + + + true + $(SolutionDir)\build\$(Configuration)\ + + + false + $(SolutionDir)\build\$(Configuration)\ + + + + Level3 + true + true + stdcpp20 + $(SolutionDir)libs\libvalinet;$(SolutionDir)libs\funchook\include;$(SolutionDir)libs\funchook\distorm\include;%(AdditionalIncludeDirectories) + pch.h + + + Console + true + $(SolutionDir)libs\funchook\build\Release\;%(AdditionalLibraryDirectories) + + + + + _DEBUG;%(PreprocessorDefinitions) + MultiThreadedDebug + + + + + true + true + NDEBUG;WINRT_NO_SOURCE_LOCATION;%(PreprocessorDefinitions) + MultiThreaded + + + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Create + + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + + + \ No newline at end of file diff --git a/ep_gui/packages.config b/ep_gui/packages.config new file mode 100644 index 000000000..aad55f01f --- /dev/null +++ b/ep_gui/packages.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ep_gui/pch.cpp b/ep_gui/pch.cpp new file mode 100644 index 000000000..e0d2ef1a2 --- /dev/null +++ b/ep_gui/pch.cpp @@ -0,0 +1 @@ +#include "pch.h" diff --git a/ep_gui/pch.h b/ep_gui/pch.h new file mode 100644 index 000000000..210b0c132 --- /dev/null +++ b/ep_gui/pch.h @@ -0,0 +1 @@ +#pragma once diff --git a/ep_gui/resources/EPCrashMessageResources.h b/ep_gui/resources/EPCrashMessageResources.h new file mode 100644 index 000000000..49dc246a2 --- /dev/null +++ b/ep_gui/resources/EPCrashMessageResources.h @@ -0,0 +1,9 @@ +#pragma once + +// 401-500 + +#define IDS_CRASH_TITLE 401 +#define IDS_CRASH_BODY 402 +#define IDS_CRASH_ONCE 403 +#define IDS_CRASH_MULTIPLE 404 +#define IDS_CRASH_DISMISS 405 diff --git a/ep_gui/resources/EPSettingsResources.h b/ep_gui/resources/EPSettingsResources.h new file mode 100644 index 000000000..286a07cde --- /dev/null +++ b/ep_gui/resources/EPSettingsResources.h @@ -0,0 +1,384 @@ +#pragma once + +// 1001 - 2200 + +#define IDS_TB 1001 +#define IDS_TB_STYLE 1002 +#define IDS_TB_STYLE_0 1003 +#define IDS_TB_STYLE_1 1004 +#define IDS_TB_MORE 1005 +#define IDS_TB_CUSTOMIZETRAYICONS 1006 +#define IDS_TB_CUSTOMIZESYSTEMICONS 1007 +#define IDS_TB_PRIMARYTBPOS 1008 +#define IDS_TB_POSBOTTOM 1009 +#define IDS_TB_POSTOP 1010 +#define IDS_TB_POSLEFT 1011 +#define IDS_TB_POSRIGHT 1012 +#define IDS_TB_SECONDARYTBPOS 1013 +#define IDS_TB_EXTRABTN 1014 +#define IDS_TB_EXTRABTN_0 1015 +#define IDS_TB_EXTRABTN_2 1016 +#define IDS_TB_EXTRABTN_1 1017 +#define IDS_TB_SEARCHMODE_W11 1018 +#define IDS_TB_SEARCHMODE 1019 +#define IDS_TB_SEARCHMODE_0 1020 +#define IDS_TB_SEARCHMODE_1 1021 +#define IDS_TB_SEARCHMODE_2 1022 +#define IDS_TB_CORTANABTN 1023 +#define IDS_TB_TASKVIEWBTN 1024 +#define IDS_TB_WIDGETSBTN 1025 +#define IDS_TB_AUTOHIDETB 1026 +#define IDS_TB_STARTBTNSTYLE 1027 +#define IDS_TB_STARTBTNSTYLE_0 1028 +#define IDS_TB_STARTBTNSTYLE_1 1029 +#define IDS_TB_PRIMARYTBALIGN 1030 +#define IDS_TB_TBALIGN_0 1031 +#define IDS_TB_TBALIGN_1 1032 +#define IDS_TB_TBALIGN_5 1033 +#define IDS_TB_TBALIGN_3 1034 +#define IDS_TB_TBALIGN_7 1035 +#define IDS_TB_SECONDARYTBALIGN 1036 +#define IDS_TB_PRIMARYTBGLOM 1037 +#define IDS_TB_GLOM_0_D 1038 +#define IDS_TB_GLOM_0 1039 +#define IDS_TB_GLOM_1 1040 +#define IDS_TB_GLOM_2_D 1041 +#define IDS_TB_GLOM_2 1042 +#define IDS_TB_SECONDARYTBGLOM 1043 +#define IDS_TB_ICONSIZE 1044 +#define IDS_TB_ICONSIZE_1 1045 +#define IDS_TB_ICONSIZE_0 1046 + +#define IDS_TRAY 1101 +#define IDS_TRAY_SKINMENUS 1102 +#define IDS_TRAY_CENTERMENUS 1103 +#define IDS_TRAY_FLYOUTMENUS 1104 +#define IDS_TRAY_TOUCHKB 1105 +#define IDS_TRAY_SHOWSECONDS 1106 +#define IDS_TRAY_CCBTN 1107 +#define IDS_TRAY_SHOWDESKTOPBTN 1108 +#define IDS_TRAY_SHOWDESKTOPBTN_1 1109 +#define IDS_TRAY_SHOWDESKTOPBTN_0 1110 +#define IDS_TRAY_SHOWDESKTOPBTN_2 1111 +#define IDS_TRAY_SKINICONS 1112 +#define IDS_TRAY_REPLACENETWORK_L1 1113 +#define IDS_TRAY_REPLACENETWORK_L2 1114 +#define IDS_TRAY_REPLACENETWORK_0 1115 +#define IDS_TRAY_REPLACENETWORK_1 1116 +#define IDS_TRAY_REPLACENETWORK_2 1117 +#define IDS_TRAY_SYSICONBEHAVIOR 1118 +#define IDS_TRAY_NETWORK 1119 +#define IDS_TRAY_NETWORK_6 1120 +#define IDS_TRAY_NETWORK_5 1121 +#define IDS_TRAY_NETWORK_0 1122 +#define IDS_TRAY_NETWORK_2 1123 +#define IDS_TRAY_NETWORK_1 1124 +#define IDS_TRAY_SOUND 1125 +#define IDS_TRAY_SOUND_1 1126 +#define IDS_TRAY_SOUND_0 1127 +#define IDS_TRAY_CLOCK 1128 +#define IDS_TRAY_CLOCK_2 1129 +#define IDS_TRAY_CLOCK_0 1130 +#define IDS_TRAY_CLOCK_1 1131 +#define IDS_TRAY_CLOCK_2_W10 1132 +#define IDS_TRAY_BATTERY 1133 +#define IDS_TRAY_BATTERY_0 1134 +#define IDS_TRAY_BATTERY_1 1135 +#define IDS_TRAY_LANGSWITCHER 1136 +#define IDS_TRAY_LANGSWITCHER_0 1137 +#define IDS_TRAY_LANGSWITCHER_1_21H2 1138 +#define IDS_TRAY_LANGSWITCHER_7 1140 +#define IDS_TRAY_LANGSWITCHER_1 1141 +#define IDS_TRAY_LANGSWITCHER_4 1142 + +#define IDS_EXP 1201 +#define IDS_EXP_SHEXT_L1 1202 +#define IDS_EXP_SHEXT_L2 1203 +#define IDS_EXP_SHEXT_LEARN 1204 +#define IDS_EXP_SHEXT_REGISTER 1205 +#define IDS_EXP_DISABLECTXMENU 1206 +#define IDS_EXP_LEGACYFTDIALOG 1207 +#define IDS_EXP_CLASSICDRIVEGROUP 1208 +#define IDS_EXP_CTRLINTF 1209 +#define IDS_EXP_CTRLINTF_0_W11 1210 +#define IDS_EXP_CTRLINTF_0_W10 1211 +#define IDS_EXP_CTRLINTF_1_W11 1212 +#define IDS_EXP_CTRLINTF_2 1213 +#define IDS_EXP_NEWWINDOWS 1214 +#define IDS_EXP_IMMERSIVEMENUS 1215 +#define IDS_EXP_DISABLENAVBAR 1216 +#define IDS_EXP_DISABLESEARCHBAR 1217 +#define IDS_EXP_SHRINKADDRESSBAR 1218 +#define IDS_EXP_HIDESEARCHBAR 1219 +#define IDS_EXP_TITLEBAR 1220 +#define IDS_EXP_TITLEBAR_0 1221 +#define IDS_EXP_TITLEBAR_1 1222 +#define IDS_EXP_TITLEBAR_2 1223 +#define IDS_EXP_TITLEBAR_3 1224 +#define IDS_EXP_MICA 1225 +#define IDS_EXP_MICA_0 1226 +#define IDS_EXP_MICA_1 1227 +#define IDS_EXP_MICA_2 1228 + +#define IDS_START 1301 +#define IDS_START_STYLE 1302 +#define IDS_START_STYLE_0 1303 +#define IDS_START_STYLE_1 1304 +#define IDS_START_MORE 1305 +#define IDS_START_POSITION 1306 +#define IDS_START_POSITION_0 1307 +#define IDS_START_POSITION_1 1308 +#define IDS_START_MAXFREQAPPS 1309 +#define IDS_START_MAXFREQAPPS_0 1310 +#define IDS_START_MAXFREQAPPS_6 1311 +#define IDS_START_MAXFREQAPPS_99999 1312 +#define IDS_START_MONITOROVERRIDE_L1 1313 +#define IDS_START_MONITOROVERRIDE_L2 1314 +#define IDS_START_MONITOROVERRIDE_1 1315 +#define IDS_START_MONITOROVERRIDE_0 1316 +#define IDS_START_MONITOROVERRIDE_2 1317 +#define IDS_START_MONITOROVERRIDE_3 1318 +#define IDS_START_MONITOROVERRIDE_4 1319 +#define IDS_START_MONITOROVERRIDE_5 1320 +#define IDS_START_MONITOROVERRIDE_6 1321 +#define IDS_START_MONITOROVERRIDE_7 1322 +#define IDS_START_MONITOROVERRIDE_8 1323 +#define IDS_START_MONITOROVERRIDE_9 1324 +#define IDS_START_NORECOMMENDED 1325 +#define IDS_START_MAKEALLAPPSDEFAULT 1326 +#define IDS_START_SHOWMORETILES 1327 +#define IDS_START_CORNERPREF 1328 +#define IDS_START_CORNERPREF_1 1329 +#define IDS_START_CORNERPREF_2 1330 +#define IDS_START_CORNERPREF_0 1331 +#define IDS_START_DISPLAYMODE 1332 +#define IDS_START_DISPLAYMODE_0 1333 +#define IDS_START_DISPLAYMODE_1 1334 +#define IDS_START_DISPLAYMODE_2 1335 +#define IDS_START_APPLIST 1336 +#define IDS_START_APPLIST_0 1337 +#define IDS_START_APPLIST_3 1338 +#define IDS_START_APPLIST_1 1339 +#define IDS_START_NOTICE 1340 +#define IDS_START_WIN10_NOTICE 1341 + +#define IDS_AT 1401 +#define IDS_AT_STYLE 1402 +#define IDS_AT_STYLE_0_W11 1403 +#define IDS_AT_STYLE_0_W10 1404 +#define IDS_AT_STYLE_3 1405 +#define IDS_AT_STYLE_1 1406 +#define IDS_AT_STYLE_2 1407 +#define IDS_AT_SWS_INCLUDEWALLPAPER 1408 +#define IDS_AT_SWS_PRIMARYONLY 1409 +#define IDS_AT_SWS_PERMONITOR 1410 +#define IDS_AT_SWS_GROUPWINDOWS 1411 +#define IDS_AT_SWS_NOPERAPP 1412 +#define IDS_AT_SWS_THEME 1413 +#define IDS_AT_SWS_THEME_0 1414 +#define IDS_AT_SWS_THEME_1 1415 +#define IDS_AT_SWS_THEME_2 1416 +#define IDS_AT_SWS_OPACITY 1417 +#define IDS_AT_SWS_OPACITY_100 1418 +#define IDS_AT_SWS_OPACITY_95 1419 +#define IDS_AT_SWS_COLORSCHEME 1420 +#define IDS_AT_SWS_COLORSCHEME_0 1421 +#define IDS_AT_SWS_COLORSCHEME_1 1422 +#define IDS_AT_SWS_COLORSCHEME_2 1423 +#define IDS_AT_SWS_CORNERPREF 1424 +#define IDS_AT_SWS_CORNERPREF_2 1425 +#define IDS_AT_SWS_CORNERPREF_3 1426 +#define IDS_AT_SWS_CORNERPREF_1 1427 +#define IDS_AT_SWS_ROWHEIGHT 1428 +#define IDS_AT_SWS_ROWHEIGHT_230 1429 +#define IDS_AT_SWS_MAXWIDTH 1430 +#define IDS_AT_SWS_MAXWIDTH_100 1431 +#define IDS_AT_SWS_MAXWIDTH_80 1432 +#define IDS_AT_SWS_MAXHEIGHT 1433 +#define IDS_AT_SWS_MAXHEIGHT_100 1434 +#define IDS_AT_SWS_MAXHEIGHT_80 1435 +#define IDS_AT_SWS_PADDING 1436 +#define IDS_AT_SWS_PADDING_20 1437 +#define IDS_AT_SWS_PADDING_0 1438 +#define IDS_AT_SWS_SHOWDELAY 1439 +#define IDS_AT_SWS_SHOWDELAY_0 1440 +#define IDS_AT_SWS_SHOWDELAY_25 1441 +#define IDS_AT_SWS_SHOWDELAY_50 1442 +#define IDS_AT_SWS_SHOWDELAY_75 1443 +#define IDS_AT_SWS_SHOWDELAY_100 1444 +#define IDS_AT_SWS_SHOWDELAY_125 1445 +#define IDS_AT_SWS_SHOWDELAY_150 1446 +#define IDS_AT_SWS_SHOWDELAY_200 1447 +#define IDS_AT_SWS_SHOWDELAY_300 1448 +#define IDS_AT_SWS_SHOWDELAY_400 1449 +#define IDS_AT_SWS_SHOWDELAY_500 1450 +#define IDS_AT_SWS_SCROLLWHEEL 1451 +#define IDS_AT_SWS_SCROLLWHEEL_0 1452 +#define IDS_AT_SWS_SCROLLWHEEL_1 1453 +#define IDS_AT_SWS_SCROLLWHEEL_2 1454 +#define IDS_AT_SWS_LEARN 1455 + +#define IDS_WEATHER 1501 +#define IDS_WEATHER_SHOW 1502 +#define IDS_WEATHER_LOC 1503 +#define IDS_WEATHER_LOC_PROMPT 1504 +#define IDS_WEATHER_LOC_DEFAULT 1505 +#define IDS_WEATHER_LAYOUT 1506 +#define IDS_WEATHER_LAYOUT_0 1507 +#define IDS_WEATHER_LAYOUT_3 1508 +#define IDS_WEATHER_LAYOUT_1 1509 +#define IDS_WEATHER_LAYOUT_4 1510 +#define IDS_WEATHER_LAYOUT_5 1511 +#define IDS_WEATHER_SIZE 1512 +#define IDS_WEATHER_SIZE_0 1513 +#define IDS_WEATHER_SIZE_2 1514 +#define IDS_WEATHER_SIZE_1 1515 +#define IDS_WEATHER_POSITION 1516 +#define IDS_WEATHER_POSITION_0 1517 +#define IDS_WEATHER_POSITION_1 1518 +#define IDS_WEATHER_UPDATEFREQ 1519 +#define IDS_WEATHER_UPDATEFREQ_60 1520 +#define IDS_WEATHER_UPDATEFREQ_300 1521 +#define IDS_WEATHER_UPDATEFREQ_900 1522 +#define IDS_WEATHER_UPDATEFREQ_1200 1523 +#define IDS_WEATHER_UPDATEFREQ_1800 1524 +#define IDS_WEATHER_UPDATEFREQ_3600 1525 +#define IDS_WEATHER_UPDATEFREQ_7200 1526 +#define IDS_WEATHER_TEMPUNIT 1527 +#define IDS_WEATHER_TEMPUNIT_0 1528 +#define IDS_WEATHER_TEMPUNIT_1 1529 +#define IDS_WEATHER_LANG 1533 +#define IDS_WEATHER_LANG_PROMPT 1534 +#define IDS_WEATHER_LANG_DEFAULT 1535 +#define IDS_WEATHER_COLORSCHEME 1536 +#define IDS_WEATHER_COLORSCHEME_0 1537 +#define IDS_WEATHER_COLORSCHEME_1 1538 +#define IDS_WEATHER_COLORSCHEME_2 1539 +#define IDS_WEATHER_CORNERPREF 1540 +#define IDS_WEATHER_CORNERPREF_2 1541 +#define IDS_WEATHER_CORNERPREF_3 1542 +#define IDS_WEATHER_CORNERPREF_1 1543 +#define IDS_WEATHER_ICONPACK 1544 +#define IDS_WEATHER_ICONPACK_0 1545 +#define IDS_WEATHER_ICONPACK_1 1546 +#define IDS_WEATHER_CONTENTSMODE 1547 +#define IDS_WEATHER_CONTENTSMODE_0 1548 +#define IDS_WEATHER_CONTENTSMODE_1 1549 +#define IDS_WEATHER_ZOOM 1550 +#define IDS_WEATHER_ZOOM_100 1551 +#define IDS_WEATHER_LEARN 1552 +#define IDS_WEATHER_LASTUPDATE 1553 +#define IDS_WEATHER_UPDATE 1554 +#define IDS_WEATHER_CLEAR 1555 + +#define IDS_SP 1601 +#define IDS_SP_HIDEICON 1602 +#define IDS_SP_DESKTOPMENU 1603 +#define IDS_SP_DESKTOPMENU_0 1604 +#define IDS_SP_DESKTOPMENU_32 1605 +#define IDS_SP_DESKTOPMENU_48 1606 +#define IDS_SP_DESKTOPMENU_288 1607 +#define IDS_SP_DESKTOPMENU_800 1608 +#define IDS_SP_DESKTOPMENU_304 1609 +#define IDS_SP_DESKTOPMENU_816 1610 +#define IDS_SP_DESKTOPMENU_1008 1611 +#define IDS_SP_UPDATEFREQ 1612 +#define IDS_SP_UPDATEFREQ_0 1613 +#define IDS_SP_UPDATEFREQ_60 1614 +#define IDS_SP_UPDATEFREQ_300 1615 +#define IDS_SP_UPDATEFREQ_900 1616 +#define IDS_SP_UPDATEFREQ_1200 1617 +#define IDS_SP_UPDATEFREQ_1800 1618 +#define IDS_SP_UPDATEFREQ_3600 1619 +#define IDS_SP_UPDATEFREQ_7200 1620 +#define IDS_SP_UPDATEFREQ_21600 1621 +#define IDS_SP_UPDATEFREQ_43200 1622 +#define IDS_SP_UPDATEFREQ_86400 1623 +#define IDS_SP_MOREOPTIONS 1624 + +#define IDS_OTHER 1701 +#define IDS_OTHER_REMEMBERLAST 1702 +#define IDS_OTHER_CLOCKFLYOUT 1703 +#define IDS_OTHER_TOOLBARSEPARATORS 1704 +#define IDS_OTHER_WINXPROPERTIES 1705 +#define IDS_OTHER_DONTUSEPOWERSHELL 1706 +#define IDS_OTHER_WINXACCELERATOR 1707 +#define IDS_OTHER_DISABLEOFFICE 1708 +#define IDS_OTHER_DISABLEWINF 1709 +#define IDS_OTHER_DISABLERC 1710 +#define IDS_OTHER_DISABLEAEROSNAP 1711 +#define IDS_OTHER_SNAPASSISTSTYLE 1712 +#define IDS_OTHER_SNAPASSISTSTYLE_0 1713 +#define IDS_OTHER_SNAPASSISTSTYLE_3 1714 +#define IDS_OTHER_PWRBTNACTION 1715 +#define IDS_OTHER_PWRBTNACTION_256 1716 +#define IDS_OTHER_PWRBTNACTION_1 1717 +#define IDS_OTHER_PWRBTNACTION_16 1718 +#define IDS_OTHER_PWRBTNACTION_64 1719 +#define IDS_OTHER_PWRBTNACTION_2 1720 +#define IDS_OTHER_PWRBTNACTION_4 1721 +#define IDS_OTHER_NOREDIRECT 1722 +#define IDS_OTHER_NOREDIRECT_SYSTEM 1723 +#define IDS_OTHER_NOREDIRECT_PROGRAMS 1724 +#define IDS_OTHER_NOREDIRECT_DATETIME 1725 +#define IDS_OTHER_NOREDIRECT_TRAYICONS 1726 + +#define IDS_UPDATES 1801 +#define IDS_UPDATES_POLICY 1802 +#define IDS_UPDATES_POLICY_1 1803 +#define IDS_UPDATES_POLICY_0 1804 +#define IDS_UPDATES_POLICY_2 1805 +#define IDS_UPDATES_PREFER_STAGING 1806 +#define IDS_UPDATES_DOWNGRADES 1807 +#define IDS_UPDATES_UPDATESERVERS 1808 +#define IDS_UPDATES_RELEASES 1809 +#define IDS_UPDATES_RELEASES_PROMPT 1810 +#define IDS_UPDATES_STAGING 1811 +#define IDS_UPDATES_STAGING_PROMPT 1812 +#define IDS_UPDATES_CHECK 1813 +#define IDS_UPDATES_INSTALL 1814 +#define IDS_UPDATES_CHANGES 1815 +#define IDS_UPDATES_LEARN 1816 + +#define IDS_ADV 1901 +#define IDS_ADV_DISCLAIMER 1902 +#define IDS_ADV_LEARN 1903 +#define IDS_ADV_CONSOLE 1904 +#define IDS_ADV_MEMCHECK 1905 +#define IDS_ADV_AUTOHIDE 1906 +#define IDS_ADV_PAINTDESKTOPVERSION 1907 +#define IDS_ADV_CLASSICTHEME 1908 +#define IDS_ADV_SYSLISTVIEW32 1909 +#define IDS_ADV_NOPROPERTIES 1910 +#define IDS_ADV_SYMBOLS 1911 +#define IDS_ADV_PINNEDITEMS 1912 +#define IDS_ADV_REMOVEEXTRAGAP 1913 +#define IDS_ADV_DELAY 1914 +#define IDS_ADV_DELAY_0 1915 +#define IDS_ADV_DELAY_300 1916 +#define IDS_ADV_DELAY_600 1917 +#define IDS_ADV_DELAY_1000 1918 +#define IDS_ADV_DELAY_1500 1919 +#define IDS_ADV_DELAY_2000 1920 +#define IDS_ADV_DELAY_3000 1921 +#define IDS_ADV_DELAY_4000 1922 +#define IDS_ADV_DELAY_5000 1923 +#define IDS_ADV_DELAY_6000 1924 +#define IDS_ADV_DELAY_8000 1925 +#define IDS_ADV_DELAY_10000 1926 + +#define IDS_ABOUT 2001 +#define IDS_ABOUT_VERSION 2002 +#define IDS_ABOUT_PROJECT 2003 +#define IDS_ABOUT_AUTHOR 2004 +#define IDS_ABOUT_OS 2005 +#define IDS_ABOUT_GITHUB 2006 +#define IDS_ABOUT_WEBSITE 2007 +#define IDS_ABOUT_DONATE 2009 +#define IDS_ABOUT_FAQ 2010 +#define IDS_ABOUT_SETTINGS 2011 +#define IDS_ABOUT_IMPORT 2012 +#define IDS_ABOUT_EXPORT 2013 +#define IDS_ABOUT_RESET 2014 + +#define IDS_FOOTER_RESTART 2101 diff --git a/ep_gui/resources/ep_gui.rc b/ep_gui/resources/ep_gui.rc new file mode 100644 index 000000000..9ea1170b2 --- /dev/null +++ b/ep_gui/resources/ep_gui.rc @@ -0,0 +1,121 @@ +// Microsoft Visual C++ generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "winres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (United States) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE +BEGIN + "#include ""winres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Version +// +#include "..\version.h" + +VS_VERSION_INFO VERSIONINFO + FILEVERSION VER_FILE + PRODUCTVERSION VER_PRODUCT + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x40004L + FILETYPE 0x1L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", "VALINET Solutions SRL" + VALUE "FileDescription", "ExplorerPatcher Settings" + VER_FILE_STRING + VALUE "InternalName", "ep_gui.exe" + VALUE "LegalCopyright", "Copyright (C) 2006-2023 VALINET Solutions SRL. All rights reserved." + VALUE "OriginalFilename", "ep_gui.exe" + VALUE "ProductName", "ExplorerPatcher" + VER_PRODUCT_STRING + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// RCDATA +// + +IDR_REGISTRY1 RCDATA "resources\settings.reg" +IDR_REGISTRY2 RCDATA "resources\settings10.reg" + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE +BEGIN + IDS_PRODUCTNAME "ExplorerPatcher" +END + +#endif // English (United States) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/ep_gui/resources/lang/ep_gui.en-US.rc b/ep_gui/resources/lang/ep_gui.en-US.rc new file mode 100644 index 000000000..7bd046813 --- /dev/null +++ b/ep_gui/resources/lang/ep_gui.en-US.rc @@ -0,0 +1,405 @@ +#include "resources/resource.h" +#include "winres.h" + +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US + +STRINGTABLE +BEGIN + IDS_CRASH_TITLE "Unfortunately, File Explorer is crashing :(" + IDS_CRASH_BODY "It seems that File Explorer closed unexpectedly %1$s in less than %2$d seconds each time when starting up. This might indicate a problem caused by ExplorerPatcher, which might be unaware of recent changes in Windows, for example when running on a new OS build.\nHere are a few recommendations:\n• If an updated version is available, you can update ExplorerPatcher and restart File Explorer.\n• On GitHub, you can view releases, check the current status, discuss or review the latest issues.\n• If you suspect this is not caused by ExplorerPatcher, please uninstall any recently installed shell extensions or similar utilities.\n• If no fix is available for the time being, you can uninstall ExplorerPatcher, and then later reinstall it when a fix is published on GitHub. Rest assured, even if you uninstall, your program configuration will be preserved.\n\nI am sorry for the inconvenience this might cause; I am doing my best to try to keep this program updated and working.\n\nExplorerPatcher is disabled until the next File Explorer restart, in order to allow you to perform maintenance tasks and take the necessary actions." + IDS_CRASH_ONCE "once" + IDS_CRASH_MULTIPLE "%d times" + IDS_CRASH_DISMISS "Dismiss" + + IDS_TB "Taskbar" + + IDS_TB_STYLE "Taskbar style" + IDS_TB_STYLE_0 "Windows 11 (default)" + IDS_TB_STYLE_1 "Windows 10" + IDS_TB_MORE "More taskbar options in the Settings app" + IDS_TB_CUSTOMIZETRAYICONS "Customize notification area icons" + IDS_TB_CUSTOMIZESYSTEMICONS "Customize system icons in the notification area" + IDS_TB_PRIMARYTBPOS "Primary taskbar location on screen" + IDS_TB_POSBOTTOM "Bottom (default)" + IDS_TB_POSTOP "Top" + IDS_TB_POSLEFT "Left" + IDS_TB_POSRIGHT "Right" + IDS_TB_SECONDARYTBPOS "Secondary taskbar(s) location on screen" + IDS_TB_EXTRABTN "Extra button should be" + IDS_TB_EXTRABTN_0 "Hidden (default)" + IDS_TB_EXTRABTN_2 "Shown and open Cortana" + IDS_TB_EXTRABTN_1 "Shown and open Widgets" + IDS_TB_SEARCHMODE_W11 "Show Search button" + IDS_TB_SEARCHMODE "Search" + IDS_TB_SEARCHMODE_0 "Hidden" + IDS_TB_SEARCHMODE_1 "Show search icon" + IDS_TB_SEARCHMODE_2 "Show search box" + IDS_TB_CORTANABTN "Show Cortana button" + IDS_TB_TASKVIEWBTN "Show Task view button" + IDS_TB_WIDGETSBTN "Show Widgets button" + IDS_TB_AUTOHIDETB "Automatically hide the taskbar" + IDS_TB_STARTBTNSTYLE "Start button style" + IDS_TB_STARTBTNSTYLE_0 "Windows 10 (default)" + IDS_TB_STARTBTNSTYLE_1 "Windows 11" + IDS_TB_PRIMARYTBALIGN "Primary taskbar alignment" + IDS_TB_TBALIGN_0 "At screen edge (default)" + IDS_TB_TBALIGN_1 "Centered" + IDS_TB_TBALIGN_5 "Centered, at screen edge when full" + IDS_TB_TBALIGN_3 "Centered with Start button" + IDS_TB_TBALIGN_7 "Centered with Start button, at screen edge when full" + IDS_TB_SECONDARYTBALIGN "Secondary taskbar(s) alignment" + IDS_TB_PRIMARYTBGLOM "Combine taskbar icons on primary taskbar" + IDS_TB_GLOM_0_D "Always combine (default)" + IDS_TB_GLOM_0 "Always combine" + IDS_TB_GLOM_1 "Combine when taskbar is full" + IDS_TB_GLOM_2_D "Never combine (default)" + IDS_TB_GLOM_2 "Never combine" + IDS_TB_SECONDARYTBGLOM "Combine taskbar icons on secondary taskbar(s)" + IDS_TB_ICONSIZE "Taskbar icon size" + IDS_TB_ICONSIZE_1 "Small" + IDS_TB_ICONSIZE_0 "Large (default)" + + IDS_TRAY "System tray" + + IDS_TRAY_SKINMENUS "Skin taskbar and tray pop-up menus" + IDS_TRAY_CENTERMENUS "Center tray icon pop-up menus" + IDS_TRAY_FLYOUTMENUS "Flyout behavior for tray icon pop-up menus" + IDS_TRAY_TOUCHKB "Show touch keyboard button" + IDS_TRAY_SHOWSECONDS "Show seconds in the clock" + IDS_TRAY_CCBTN "Control Center button" + IDS_TRAY_SHOWDESKTOPBTN "Show desktop button" + IDS_TRAY_SHOWDESKTOPBTN_1 "Enabled (default)" + IDS_TRAY_SHOWDESKTOPBTN_0 "Disabled" + IDS_TRAY_SHOWDESKTOPBTN_2 "Hidden" + IDS_TRAY_SKINICONS "Apply Windows 11 style to system tray icons" + IDS_TRAY_REPLACENETWORK_L1 "Choosing 'Open Network && Internet settings' when right clicking the" + IDS_TRAY_REPLACENETWORK_L2 "network icon should open:" + IDS_TRAY_REPLACENETWORK_0 "Network section in the Settings app (default)" + IDS_TRAY_REPLACENETWORK_1 "Network and Sharing Center in Control Panel" + IDS_TRAY_REPLACENETWORK_2 "Network Connections in Control Panel" + IDS_TRAY_SYSICONBEHAVIOR "When clicking a system icon in the system tray, open:" + IDS_TRAY_NETWORK "Network" + IDS_TRAY_NETWORK_6 "Control Center" + IDS_TRAY_NETWORK_5 "Windows 11 WiFi flyout" + IDS_TRAY_NETWORK_0 "Windows 10 flyout (default)" + IDS_TRAY_NETWORK_2 "Windows 8 flyout" + IDS_TRAY_NETWORK_1 "Network section in the Settings app" + IDS_TRAY_SOUND "Sound" + IDS_TRAY_SOUND_1 "Windows 10 flyout (default)" + IDS_TRAY_SOUND_0 "Windows 7 flyout" + IDS_TRAY_CLOCK "Clock" + IDS_TRAY_CLOCK_2 "Windows 11 flyout" + IDS_TRAY_CLOCK_0 "Windows 10 flyout (default)" + IDS_TRAY_CLOCK_1 "Windows 7" + IDS_TRAY_CLOCK_2_W10 "Action Center" + IDS_TRAY_BATTERY "Battery" + IDS_TRAY_BATTERY_0 "Windows 10 flyout (default)" + IDS_TRAY_BATTERY_1 "Windows 7" + IDS_TRAY_LANGSWITCHER "Language switcher" + IDS_TRAY_LANGSWITCHER_0 "Windows 11 (default)" + IDS_TRAY_LANGSWITCHER_1_21H2 "Windows 10 (with link to ""Language Preferences"")" + IDS_TRAY_LANGSWITCHER_7 "Windows 10" + IDS_TRAY_LANGSWITCHER_1 "Windows 10 (with link to ""Language Preferences"") (no animation)" + IDS_TRAY_LANGSWITCHER_4 "Windows 10 (no animation)" + + IDS_EXP "File Explorer" + + IDS_EXP_SHEXT_L1 "For the settings marked with (**) to work in Open or Save file dialogs as well, register" + IDS_EXP_SHEXT_L2 "this utility as shell extension using the option below." + IDS_EXP_SHEXT_LEARN "Learn more" + IDS_EXP_SHEXT_REGISTER "Register as shell extension" + IDS_EXP_DISABLECTXMENU "Disable the Windows 11 context menu" + IDS_EXP_LEGACYFTDIALOG "Always use legacy file transfer dialog" + IDS_EXP_CLASSICDRIVEGROUP "Use classic drive groupings in This PC" + IDS_EXP_CTRLINTF "Control Interface" + IDS_EXP_CTRLINTF_0_W11 "Windows 11 Command Bar (default)" + IDS_EXP_CTRLINTF_0_W10 "Windows 10 Ribbon (default)" + IDS_EXP_CTRLINTF_1_W11 "Windows 10 Ribbon" + IDS_EXP_CTRLINTF_2 "Windows 7 Command Bar" + IDS_EXP_NEWWINDOWS "The following settings take effect on newly created File Explorer windows:" + IDS_EXP_IMMERSIVEMENUS "Use immersive menus when displaying Windows 10 context menus" + IDS_EXP_DISABLENAVBAR "Disable navigation bar" + IDS_EXP_DISABLESEARCHBAR "Disable modern search bar" + IDS_EXP_SHRINKADDRESSBAR "Shrink address bar height" + IDS_EXP_HIDESEARCHBAR "Hide search bar completely" + IDS_EXP_TITLEBAR "Title bar" + IDS_EXP_TITLEBAR_0 "Show icon and title (default)" + IDS_EXP_TITLEBAR_1 "Hide title, show icon" + IDS_EXP_TITLEBAR_2 "Hide icon, show title" + IDS_EXP_TITLEBAR_3 "Hide icon and title" + IDS_EXP_MICA "Apply Mica effect on these areas" + IDS_EXP_MICA_0 "Let File Explorer decide (default)" + IDS_EXP_MICA_1 "Title bar, command bar and navigation bar" + IDS_EXP_MICA_2 "Nowhere" + + IDS_START "Start menu" + + IDS_START_STYLE "Start menu style" + IDS_START_STYLE_0 "Windows 11 (default)" + IDS_START_STYLE_1 "Windows 10" + IDS_START_MORE "More Start menu options in the Settings app" + IDS_START_POSITION "Position on screen" + IDS_START_POSITION_0 "At screen edge" + IDS_START_POSITION_1 "Center (default)" + IDS_START_MAXFREQAPPS "Maximum number of frequent apps to show" + IDS_START_MAXFREQAPPS_0 "None" + IDS_START_MAXFREQAPPS_6 "6 (default)" + IDS_START_MAXFREQAPPS_99999 "Unlimited" + IDS_START_MONITOROVERRIDE_L1 "When using multiple displays, open Start on this monitor when invoked using" + IDS_START_MONITOROVERRIDE_L2 "the keyboard" + IDS_START_MONITOROVERRIDE_1 "Primary monitor (default)" + IDS_START_MONITOROVERRIDE_0 "Monitor on which the cursor is on" + IDS_START_MONITOROVERRIDE_2 "Monitor #2" + IDS_START_MONITOROVERRIDE_3 "Monitor #3" + IDS_START_MONITOROVERRIDE_4 "Monitor #4" + IDS_START_MONITOROVERRIDE_5 "Monitor #5" + IDS_START_MONITOROVERRIDE_6 "Monitor #6" + IDS_START_MONITOROVERRIDE_7 "Monitor #7" + IDS_START_MONITOROVERRIDE_8 "Monitor #8" + IDS_START_MONITOROVERRIDE_9 "Monitor #9" + IDS_START_NORECOMMENDED "Disable the ""Recommended"" section" + IDS_START_MAKEALLAPPSDEFAULT "Open Start in All apps by default" + IDS_START_SHOWMORETILES "Show more tiles" + IDS_START_CORNERPREF "Corner preference" + IDS_START_CORNERPREF_1 "Rounded corners, floating menu" + IDS_START_CORNERPREF_2 "Rounded corners, docked menu" + IDS_START_CORNERPREF_0 "Not rounded" + IDS_START_DISPLAYMODE "Display mode" + IDS_START_DISPLAYMODE_0 "Default" + IDS_START_DISPLAYMODE_1 "Start menu" + IDS_START_DISPLAYMODE_2 "Full screen Start" + IDS_START_APPLIST "App list" + IDS_START_APPLIST_0 "Display" + IDS_START_APPLIST_3 "Hide" + IDS_START_APPLIST_1 "Disable" + IDS_START_NOTICE "IMPORTANT, MUST READ: Notice regarding this feature (online)" + IDS_START_WIN10_NOTICE "Some settings might not be available in older Windows 10 versions." + + IDS_AT "Window switcher" + + IDS_AT_STYLE "Window switcher (Alt+Tab) style" + IDS_AT_STYLE_0_W11 "Windows 11 (default)" + IDS_AT_STYLE_0_W10 "Windows 10 (default)" + IDS_AT_STYLE_3 "Windows 10" + IDS_AT_STYLE_1 "Windows NT" + IDS_AT_STYLE_2 "Simple Window Switcher" + IDS_AT_SWS_INCLUDEWALLPAPER "Show the desktop as the last window in the interaction list" + IDS_AT_SWS_PRIMARYONLY "Always display switcher on primary monitor" + IDS_AT_SWS_PERMONITOR "Display windows only from the monitor containing the cursor" + IDS_AT_SWS_GROUPWINDOWS "Group windows of the same app" + IDS_AT_SWS_NOPERAPP "Disable the interaction list for individual apps ( Alt + %c )" + IDS_AT_SWS_THEME "Theme" + IDS_AT_SWS_THEME_0 "Default" + IDS_AT_SWS_THEME_1 "Acrylic" + IDS_AT_SWS_THEME_2 "Mica (always opaque)" + IDS_AT_SWS_OPACITY "Opacity" + IDS_AT_SWS_OPACITY_100 "Opaque" + IDS_AT_SWS_OPACITY_95 "95 % (default)" + IDS_AT_SWS_COLORSCHEME "Color scheme" + IDS_AT_SWS_COLORSCHEME_0 "Follow system setting (default)" + IDS_AT_SWS_COLORSCHEME_1 "Light" + IDS_AT_SWS_COLORSCHEME_2 "Dark" + IDS_AT_SWS_CORNERPREF "Corner preference" + IDS_AT_SWS_CORNERPREF_2 "Rounded (default)" + IDS_AT_SWS_CORNERPREF_3 "Small rounded" + IDS_AT_SWS_CORNERPREF_1 "Not rounded" + IDS_AT_SWS_ROWHEIGHT "Row height" + IDS_AT_SWS_ROWHEIGHT_230 "230 pt (default)" + IDS_AT_SWS_MAXWIDTH "Maximum width (percentage of screen width)" + IDS_AT_SWS_MAXWIDTH_100 "100 % (not recommended)" + IDS_AT_SWS_MAXWIDTH_80 "80 % (default)" + IDS_AT_SWS_MAXHEIGHT "Maximum height (percentage of screen height)" + IDS_AT_SWS_MAXHEIGHT_100 "100 % (not recommended)" + IDS_AT_SWS_MAXHEIGHT_80 "80 % (default)" + IDS_AT_SWS_PADDING "Window padding" + IDS_AT_SWS_PADDING_20 "20 pt (default)" + IDS_AT_SWS_PADDING_0 "None" + IDS_AT_SWS_SHOWDELAY "Show delay" + IDS_AT_SWS_SHOWDELAY_0 "None" + IDS_AT_SWS_SHOWDELAY_25 "25 ms" + IDS_AT_SWS_SHOWDELAY_50 "50 ms" + IDS_AT_SWS_SHOWDELAY_75 "75 ms" + IDS_AT_SWS_SHOWDELAY_100 "100 ms (default)" + IDS_AT_SWS_SHOWDELAY_125 "125 ms" + IDS_AT_SWS_SHOWDELAY_150 "150 ms" + IDS_AT_SWS_SHOWDELAY_200 "200 ms" + IDS_AT_SWS_SHOWDELAY_300 "300 ms" + IDS_AT_SWS_SHOWDELAY_400 "400 ms" + IDS_AT_SWS_SHOWDELAY_500 "500 ms" + IDS_AT_SWS_SCROLLWHEEL "Use the scroll wheel to change selection" + IDS_AT_SWS_SCROLLWHEEL_0 "Never (default)" + IDS_AT_SWS_SCROLLWHEEL_1 "When cursor is over the switcher" + IDS_AT_SWS_SCROLLWHEEL_2 "Always" + IDS_AT_SWS_LEARN "Learn more about Simple Window Switcher" + + IDS_WEATHER "Weather" + + IDS_WEATHER_SHOW "Show Weather on the taskbar" + IDS_WEATHER_LOC "Location" + IDS_WEATHER_LOC_PROMPT "Search City or Zip Code; the program looks up ""weather in /* what you typed */"" on Google. Leave blank for the default value (current location)." + IDS_WEATHER_LOC_DEFAULT "Current location (default)" + IDS_WEATHER_LAYOUT "Layout" + IDS_WEATHER_LAYOUT_0 "Icon and description (default)" + IDS_WEATHER_LAYOUT_3 "Icon and temperature" + IDS_WEATHER_LAYOUT_1 "Icon only" + IDS_WEATHER_LAYOUT_4 "Temperature only" + IDS_WEATHER_LAYOUT_5 "Temperature and description" + IDS_WEATHER_SIZE "Widget size" + IDS_WEATHER_SIZE_0 "Automatic (fit contents) (default)" + IDS_WEATHER_SIZE_2 "Automatic (fit contents) with threshold" + IDS_WEATHER_SIZE_1 "Fixed" + IDS_WEATHER_POSITION "Widget position" + IDS_WEATHER_POSITION_0 "Right / bottom (default)" + IDS_WEATHER_POSITION_1 "Left / top" + IDS_WEATHER_UPDATEFREQ "Update frequency" + IDS_WEATHER_UPDATEFREQ_60 "Every minute" + IDS_WEATHER_UPDATEFREQ_300 "Every 5 minutes" + IDS_WEATHER_UPDATEFREQ_900 "Every 15 minutes" + IDS_WEATHER_UPDATEFREQ_1200 "Every 20 minutes (default)" + IDS_WEATHER_UPDATEFREQ_1800 "Every half an hour" + IDS_WEATHER_UPDATEFREQ_3600 "Every hour" + IDS_WEATHER_UPDATEFREQ_7200 "Every couple of hours" + IDS_WEATHER_TEMPUNIT "Temperature unit" + IDS_WEATHER_TEMPUNIT_0 "Celsius (default)" + IDS_WEATHER_TEMPUNIT_1 "Fahrenheit" + IDS_WEATHER_LANG "Language" + IDS_WEATHER_LANG_PROMPT "Type the short code for the language you'd like the weather data to be displayed in. For example, try ""en"", ""ro"", ""de"", ""fr"" etc. Leave blank for the default value (language of the Windows OS)." + IDS_WEATHER_LANG_DEFAULT "System language (default)" + IDS_WEATHER_COLORSCHEME "Color scheme" + IDS_WEATHER_COLORSCHEME_0 "Follow system setting (default)" + IDS_WEATHER_COLORSCHEME_1 "Light" + IDS_WEATHER_COLORSCHEME_2 "Dark" + IDS_WEATHER_CORNERPREF "Corner preference" + IDS_WEATHER_CORNERPREF_2 "Rounded (default)" + IDS_WEATHER_CORNERPREF_3 "Small rounded" + IDS_WEATHER_CORNERPREF_1 "Not rounded" + IDS_WEATHER_ICONPACK "Icon pack" + IDS_WEATHER_ICONPACK_0 "Microsoft (default)" + IDS_WEATHER_ICONPACK_1 "Google" + IDS_WEATHER_CONTENTSMODE "Display widget contents" + IDS_WEATHER_CONTENTSMODE_0 "On a single line (default)" + IDS_WEATHER_CONTENTSMODE_1 "On 2 lines, if possible" + IDS_WEATHER_ZOOM "Zoom" + IDS_WEATHER_ZOOM_100 "100 % (default)" + IDS_WEATHER_LEARN "Learn more about the Weather taskbar widget" + IDS_WEATHER_LASTUPDATE "Last updated on: %s, %s." + IDS_WEATHER_UPDATE "Update weather now" + IDS_WEATHER_CLEAR "Clear weather widget local data" + + IDS_SP "Spotlight" + + IDS_SP_HIDEICON "Hide the ""Learn about this picture"" icon" + IDS_SP_DESKTOPMENU "Desktop context menu items" + IDS_SP_DESKTOPMENU_0 "No items" + IDS_SP_DESKTOPMENU_32 "Switch to the next picture" + IDS_SP_DESKTOPMENU_48 "Learn about and switch to next picture" + IDS_SP_DESKTOPMENU_288 "Info and switch to next picture" + IDS_SP_DESKTOPMENU_800 "Info, copyright, and switch to next picture" + IDS_SP_DESKTOPMENU_304 "Info, learn about, and switch to next picture" + IDS_SP_DESKTOPMENU_816 "Info, copyright, learn about, and switch to next picture" + IDS_SP_DESKTOPMENU_1008 "All items" + IDS_SP_UPDATEFREQ "Update frequency" + IDS_SP_UPDATEFREQ_0 "Let Windows decide the best schedule (default)" + IDS_SP_UPDATEFREQ_60 "Every minute" + IDS_SP_UPDATEFREQ_300 "Every 5 minutes" + IDS_SP_UPDATEFREQ_900 "Every 15 minutes" + IDS_SP_UPDATEFREQ_1200 "Every 20 minutes" + IDS_SP_UPDATEFREQ_1800 "Every half an hour" + IDS_SP_UPDATEFREQ_3600 "Every hour" + IDS_SP_UPDATEFREQ_7200 "Every couple of hours" + IDS_SP_UPDATEFREQ_21600 "Every 6 hours" + IDS_SP_UPDATEFREQ_43200 "Every 12 hours" + IDS_SP_UPDATEFREQ_86400 "Once a day" + IDS_SP_MOREOPTIONS "Show more options" + + IDS_OTHER "Other" + + IDS_OTHER_REMEMBERLAST "Remember last used section in this window" + IDS_OTHER_CLOCKFLYOUT "Open clock flyout when pressing Win+C instead of Microsoft Teams" + IDS_OTHER_TOOLBARSEPARATORS "Show separators between taskbar toolbars" + IDS_OTHER_WINXPROPERTIES "Add shortcut to program settings in Win+X menu" + IDS_OTHER_DONTUSEPOWERSHELL "Show Command Prompt instead of PowerShell in Win+X menu" + IDS_OTHER_WINXACCELERATOR "Remove shortcut key from program settings item in Win+X menu" + IDS_OTHER_DISABLEOFFICE "Disable Office hotkeys (Ctrl+Alt+Shift+Windows key combinations)" + IDS_OTHER_DISABLEWINF "Disable Win+F (Feedback Hub) hotkey" + IDS_OTHER_DISABLERC "Disable rounded corners for application windows" + IDS_OTHER_DISABLEAEROSNAP "Disable quadrants when snapping windows" + IDS_OTHER_SNAPASSISTSTYLE "Snap Assist style" + IDS_OTHER_SNAPASSISTSTYLE_0 "Windows 11 (default)" + IDS_OTHER_SNAPASSISTSTYLE_3 "Windows 10" + IDS_OTHER_PWRBTNACTION "Default action in the Alt+F4 dialog on the desktop" + IDS_OTHER_PWRBTNACTION_256 "Switch user" + IDS_OTHER_PWRBTNACTION_1 "Sign out" + IDS_OTHER_PWRBTNACTION_16 "Sleep" + IDS_OTHER_PWRBTNACTION_64 "Hibernate" + IDS_OTHER_PWRBTNACTION_2 "Shut down (default)" + IDS_OTHER_PWRBTNACTION_4 "Restart" + IDS_OTHER_NOREDIRECT "Prevent the following Control Panel links from being redirected to the Settings app:" + IDS_OTHER_NOREDIRECT_SYSTEM "System / About page" + IDS_OTHER_NOREDIRECT_PROGRAMS "Programs and Features" + IDS_OTHER_NOREDIRECT_DATETIME "Adjust date/time" + IDS_OTHER_NOREDIRECT_TRAYICONS "Customize notification icons" + + IDS_UPDATES "Updates" + + IDS_UPDATES_POLICY "When File Explorer starts" + IDS_UPDATES_POLICY_1 "Notify about available updates (default)" + IDS_UPDATES_POLICY_0 "Prompt to install available updates" + IDS_UPDATES_POLICY_2 "Do not check for updates" + IDS_UPDATES_PREFER_STAGING "Receive pre-release versions, if available (not recommended)" + IDS_UPDATES_DOWNGRADES "Suggest the latest version on the server, even if it's older (not recommended)" + IDS_UPDATES_UPDATESERVERS "Update servers:" + IDS_UPDATES_RELEASES "Releases" + IDS_UPDATES_RELEASES_PROMPT "Type a URL that serves resources adhering to GitHub's releases API. To learn how to configure your own update server, please consult the wiki." + IDS_UPDATES_STAGING "Pre-releases" + IDS_UPDATES_STAGING_PROMPT "Type a URL that serves resources adhering to GitHub's pre-releases API. To learn how to configure your own update server, please consult the wiki." + IDS_UPDATES_CHECK "Check for updates" + IDS_UPDATES_INSTALL "Update program and restart File Explorer" + IDS_UPDATES_CHANGES "Read about changes in the latest releases" + IDS_UPDATES_LEARN "Learn more" + + IDS_ADV "Advanced" + + IDS_ADV_DISCLAIMER "Only change these settings after reading the documentation about them." + IDS_ADV_LEARN "Learn more" + IDS_ADV_CONSOLE "Enable console" + IDS_ADV_MEMCHECK "Dump memory leaks" + IDS_ADV_AUTOHIDE "Double click taskbar to toggle auto-hide (only works when the taskbar is locked)" + IDS_ADV_PAINTDESKTOPVERSION "Show Windows build info on the desktop" + IDS_ADV_CLASSICTHEME "Enable advanced mitigations for correct rendering using classic theme" + IDS_ADV_SYSLISTVIEW32 "Enable SysListView32 for Explorer views" + IDS_ADV_NOPROPERTIES "Do not change the taskbar context menu (e.g. do not display the ""Properties"" item)" + IDS_ADV_SYMBOLS "Enable symbols download" + IDS_ADV_PINNEDITEMS "Pinned items act as quick launch (don't group pinned items with active apps)" + IDS_ADV_REMOVEEXTRAGAP "When the taskbar shows button labels, remove the extra gap around pinned items" + IDS_ADV_DELAY "Supplementary delay at logon" + IDS_ADV_DELAY_0 "None (default)" + IDS_ADV_DELAY_300 "300 ms" + IDS_ADV_DELAY_600 "600 ms" + IDS_ADV_DELAY_1000 "1 second" + IDS_ADV_DELAY_1500 "1.5 seconds" + IDS_ADV_DELAY_2000 "2 seconds" + IDS_ADV_DELAY_3000 "3 seconds" + IDS_ADV_DELAY_4000 "4 seconds" + IDS_ADV_DELAY_5000 "5 seconds" + IDS_ADV_DELAY_6000 "6 seconds" + IDS_ADV_DELAY_8000 "8 seconds" + IDS_ADV_DELAY_10000 "10 seconds" + + IDS_ABOUT "About" + + IDS_ABOUT_VERSION "Version %d.%d.%d.%d%s" + IDS_ABOUT_PROJECT "This project aims to enhance the working environment on Windows." + IDS_ABOUT_AUTHOR "Proudly engineered by Valentin-Gabriel Radu." + IDS_ABOUT_OS "Running on %s, OS Build %d.%d." + IDS_ABOUT_GITHUB "Visit project GitHub" + IDS_ABOUT_WEBSITE "Visit web site" + IDS_ABOUT_DONATE "Donate (using PayPal)" + IDS_ABOUT_FAQ "Frequently Asked Questions" + IDS_ABOUT_SETTINGS "Learn more managing these settings" + IDS_ABOUT_IMPORT "Import settings" + IDS_ABOUT_EXPORT "Export current settings" + IDS_ABOUT_RESET "Restore default settings" + + IDS_FOOTER_RESTART "Restart File Explorer" +END diff --git a/ep_gui/resources/resource.h b/ep_gui/resources/resource.h new file mode 100644 index 000000000..e1b818e9e --- /dev/null +++ b/ep_gui/resources/resource.h @@ -0,0 +1,24 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by ep_gui.rc +// +#define IDR_REGISTRY1 101 +#define IDR_REGISTRY2 102 +#define IDS_PRODUCTNAME 201 + +// 401-500 +#include "EPCrashMessageResources.h" + +// 1001-2200 +#include "EPSettingsResources.h" + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 101 +#define _APS_NEXT_COMMAND_VALUE 40001 +#define _APS_NEXT_CONTROL_VALUE 1001 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/ep_gui/resources/settings.reg b/ep_gui/resources/settings.reg index 4f2594dac..c9bd21f51 100644 --- a/ep_gui/resources/settings.reg +++ b/ep_gui/resources/settings.reg @@ -4,270 +4,268 @@ ;M Settings ;q -;T Taskbar +;T %R:1001% [HKEY_CURRENT_USER\Software\ExplorerPatcher] -;z 2 Taskbar style * -;x 0 Windows 11 (default) -;x 1 Windows 10 +;z 2 %R:1002% * +;x 0 %R:1003% +;x 1 %R:1004% "OldTaskbar"=dword:00000001 -;y More taskbar options in the Settings app 🡕 +;y %R:1005% 🡕 ;ms-settings:taskbar -;y Customize notification area icons 🡕 +;y %R:1006% 🡕 ;shell:::{05d7b0f4-2121-4eff-bf6b-ed3f69b894d9} -;y Customize system icons in the notification area 🡕 +;y %R:1007% 🡕 ;shell:::{05d7b0f4-2121-4eff-bf6b-ed3f69b894d9}\SystemIcons ;s Taskbar_LocationSection !(IsWindows11Version22H2OrHigher&&!IsOldTaskbar) [HKEY_CURRENT_USER\Software\ExplorerPatcher] -;c 4 Primary taskbar location on screen * -;x 3 Bottom (default) -;x 1 Top -;x 0 Left -;x 2 Right +;c 4 %R:1008% * +;x 3 %R:1009% +;x 1 %R:1010% +;x 0 %R:1011% +;x 2 %R:1012% ;"Virtualized_{D17F1E1A-5919-4427-8F89-A1A8503CA3EB}_TaskbarPosition"=dword:00000003 -;c 4 Secondary taskbar(s) location on screen -;x 3 Bottom (default) -;x 1 Top -;x 0 Left -;x 2 Right +;c 4 %R:1013% +;x 3 %R:1009% +;x 1 %R:1010% +;x 0 %R:1011% +;x 2 %R:1012% ;"Virtualized_{D17F1E1A-5919-4427-8F89-A1A8503CA3EB}_MMTaskbarPosition"=dword:00000003 ;g Taskbar_LocationSection ;s Taskbar_CortanaButtonSection !IsWindows11Version22H2OrHigher [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced] -;c 3 Extra button should be -;x 0 Hidden (default) -;x 2 Shown and open Cortana -;x 1 Shown and open Widgets +;c 3 %R:1014% +;x 0 %R:1015% +;x 2 %R:1016% +;x 1 %R:1017% "TaskbarDa"=dword:00000000 ;g Taskbar_CortanaButtonSection [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Search] -;b Show Search button +;b %R:1018% "SearchboxTaskbarMode"=dword:00000001 [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced] -;b Show Task view button +;b %R:1024% "ShowTaskViewButton"=dword:00000001 ;s Taskbar_CortanaButtonSection1 IsWindows11Version22H2OrHigher ;s Taskbar_CortanaButtonSection2 !IsOldTaskbar [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced] -;b Show Widgets button +;b %R:1025% "TaskbarDa"=dword:00000001 ;g Taskbar_CortanaButtonSection2 ;g Taskbar_CortanaButtonSection1 [HKEY_CURRENT_USER\Software\ExplorerPatcher] -;b Automatically hide the taskbar +;b %R:1026% ;"Virtualized_{D17F1E1A-5919-4427-8F89-A1A8503CA3EB}_AutoHideTaskbar"=dword:00000000 ;s Taskbar_Windows10Section IsOldTaskbar [HKEY_CURRENT_USER\Software\ExplorerPatcher] -;c 2 Start button style * -;x 0 Windows 10 (default) -;x 1 Windows 11 +;c 2 %R:1027% * +;x 0 %R:1028% +;x 1 %R:1029% "OrbStyle"=dword:00000000 -;c 5 Primary taskbar alignment -;x 0 At screen edge (default) -;x 1 Centered -;x 5 Centered, at screen edge when full -;x 3 Centered with Start button -;x 7 Centered with Start button, at screen edge when full +;c 5 %R:1030% +;x 0 %R:1031% +;x 1 %R:1032% +;x 5 %R:1033% +;x 3 %R:1034% +;x 7 %R:1035% "OldTaskbarAl"=dword:00000000 -;c 5 Secondary taskbar(s) alignment -;x 0 At screen edge (default) -;x 1 Centered -;x 5 Centered, at screen edge when full -;x 3 Centered with Start button -;x 7 Centered with Start button, at screen edge when full +;c 5 %R:1036% +;x 0 %R:1031% +;x 1 %R:1032% +;x 5 %R:1033% +;x 3 %R:1034% +;x 7 %R:1035% "MMOldTaskbarAl"=dword:00000000 -;c 3 Combine taskbar icons on primary taskbar -;x 0 Always combine -;x 1 Combine when taskbar is full -;x 2 Never combine (default) +;c 3 %R:1037% +;x 0 %R:1039% +;x 1 %R:1040% +;x 2 %R:1041% "TaskbarGlomLevel"=dword:00000002 -;c 3 Combine taskbar icons on secondary taskbar(s) -;x 0 Always combine -;x 1 Combine when taskbar is full -;x 2 Never combine (default) +;c 3 %R:1043% +;x 0 %R:1039% +;x 1 %R:1040% +;x 2 %R:1041% "MMTaskbarGlomLevel"=dword:00000002 [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced] -;c 2 Taskbar icon size -;x 1 Small -;x 0 Large (default) +;c 2 %R:1044% +;x 1 %R:1045% +;x 0 %R:1046% "TaskbarSmallIcons"=dword:00000000 -;e -;e ;g Taskbar_Windows10Section -;T System tray +;T %R:1101% [HKEY_CURRENT_USER\Software\ExplorerPatcher] -;b Skin taskbar and tray pop-up menus +;b %R:1102% "SkinMenus"=dword:00000001 -;b Center tray icon pop-up menus +;b %R:1103% "CenterMenus"=dword:00000001 -;b Flyout behavior for tray icon pop-up menus +;b %R:1104% "FlyoutMenus"=dword:00000001 [HKEY_CURRENT_USER\Software\Microsoft\TabletTip\1.7] -;b Show touch keyboard button * +;b %R:1105% * "TipbandDesiredVisibility"=dword:00000000 ;s SystemTray_Section98 IsOldTaskbar [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced] -;b Show seconds in the clock +;b %R:1106% "ShowSecondsInSystemClock"=dword:00000000 ;g SystemTray_Section98 [HKEY_CURRENT_USER\Software\ExplorerPatcher] -;i Control Center button * +;i %R:1107% * "HideControlCenterButton"=dword:00000000 ;s SystemTray_Section109 IsOldTaskbar [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced] -;c 3 Show desktop button -;x 1 Enabled (default) -;x 0 Disabled -;x 2 Hidden +;c 3 %R:1108% +;x 1 %R:1109% +;x 0 %R:1110% +;x 2 %R:1111% "TaskbarSD"=dword:00000001 ;g SystemTray_Section109 ;s SystemTray_Section117 !IsOldTaskbar [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced] -;b Show desktop button +;b %R:1108% "TaskbarSD"=dword:00000001 ;g SystemTray_Section117 ;s SystemTray_Windows10Section IsOldTaskbar [HKEY_CURRENT_USER\Software\ExplorerPatcher] ;p 2 -;b Apply Windows 11 style to system tray icons * +;b %R:1112% * "SkinIcons"=dword:00000001 [HKEY_CURRENT_USER\Software\ExplorerPatcher] -;a Choosing 'Open Network && Internet settings' when right clicking the -;c 3 network icon should open: -;x 0 Network section in the Settings app (default) -;x 1 Network and Sharing Center in Control Panel -;x 2 Network Connections in Control Panel +;a %R:1113% +;c 3 %R:1114% +;x 0 %R:1115% +;x 1 %R:1116% +;x 2 %R:1117% "ReplaceNetwork"=dword:00000000 ;q -;t When clicking a system icon in the system tray, open: +;t %R:1118% [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Control Panel\Settings\Network] -;c 7 Network -;x 6 Control Center -;x 5 Windows 11 WiFi flyout -;x 0 Windows 10 flyout (default) -;x 2 Windows 8 flyout -;x 1 Network section in the Settings app -;x 3 Network and Sharing Center in Control Panel -;x 4 Network Connections in Control Panel +;c 7 %R:1119% +;x 6 %R:1120% +;x 5 %R:1121% +;x 0 %R:1122% +;x 2 %R:1123% +;x 1 %R:1124% +;x 3 %R:1116% +;x 4 %R:1117% "ReplaceVan"=dword:00000000 [HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\MTCUVC] -;c 2 Sound -;x 1 Windows 10 flyout (default) -;x 0 Windows 7 flyout +;c 2 %R:1125% +;x 1 %R:1126% +;x 0 %R:1127% "EnableMtcUvc"=dword:00000001 [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ImmersiveShell] -;c 3 Clock -;x 2 Windows 11 flyout -;x 0 Windows 10 flyout (default) -;x 1 Windows 7 +;c 3 %R:1128% +;x 2 %R:1129% +;x 0 %R:1130% +;x 1 %R:1131% "UseWin32TrayClockExperience"=dword:00000000 [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ImmersiveShell] -;c 2 Battery -;x 0 Windows 10 flyout (default) -;x 1 Windows 7 +;c 2 %R:1133% +;x 0 %R:1134% +;x 1 %R:1135% "UseWin32BatteryFlyout"=dword:00000000 ;s SystemTray_LanguageSwitcherBefore22H2 !IsWindows11Version22H2OrHigher [HKEY_CURRENT_USER\Software\ExplorerPatcher] -;c 3 Language switcher * -;x 0 Windows 11 (default) -;x 1 Windows 10 (with link to "Language Preferences") -;x 4 Windows 10 +;c 3 %R:1136% * +;x 0 %R:1137% +;x 1 %R:1138% +;x 4 %R:1140% "IMEStyle"=dword:00000000 ;g SystemTray_LanguageSwitcherBefore22H2 ;s SystemTray_LanguageSwitcherAfter22H2 IsWindows11Version22H2OrHigher [HKEY_CURRENT_USER\Software\ExplorerPatcher] -;c 4 Language switcher * -;x 0 Windows 11 (default) -;x 7 Windows 10 -;x 1 Windows 10 (with link to "Language Preferences") (no animation) -;x 4 Windows 10 (no animation) +;c 4 %R:1136% * +;x 0 %R:1137% +;x 7 %R:1140% +;x 1 %R:1141% +;x 4 %R:1142% "IMEStyle"=dword:00000000 ;g SystemTray_LanguageSwitcherAfter22H2 ;g SystemTray_Windows10Section -;T File Explorer -;e For the settings marked with (**) to work in Open or Save file dialogs as well, register -;e this utility as shell extension using the option below. -;y Learn more 🡕 +;T %R:1201% +;e %R:1202% +;e %R:1203% +;y %R:1204% 🡕 ;https://github.com/valinet/ExplorerPatcher/wiki/Using-ExplorerPatcher-as-shell-extension [HKEY_CURRENT_USER\Software\ExplorerPatcher] ;q -;b Register as shell extension +;b %R:1205% ;"Virtualized_{D17F1E1A-5919-4427-8F89-A1A8503CA3EB}_RegisterAsShellExtension"=dword:00000000 [-HKEY_CURRENT_USER\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32] -;d Disable the Windows 11 context menu * +;d %R:1206% * @="" [HKEY_CURRENT_USER\Software\ExplorerPatcher] -;b Always use legacy file transfer dialog +;b %R:1207% "LegacyFileTransferDialog"=dword:00000000 [HKEY_CURRENT_USER\Software\ExplorerPatcher] -;b Use classic drive groupings in This PC +;b %R:1208% "UseClassicDriveGrouping"=dword:00000000 [HKEY_CURRENT_USER\Software\ExplorerPatcher] -;c 3 Control Interface * -;x 0 Windows 11 Command Bar (default) -;x 1 Windows 10 Ribbon -;x 2 Windows 7 Command Bar +;c 3 %R:1209% * +;x 0 %R:1210% +;x 1 %R:1212% +;x 2 %R:1213% ;"Virtualized_{D17F1E1A-5919-4427-8F89-A1A8503CA3EB}_FileExplorerCommandUI"=dword:00000000 -;t The following settings take effect on newly created File Explorer windows: +;t %R:1214% [HKEY_CURRENT_USER\Software\ExplorerPatcher] -;i Use immersive menus when displaying Windows 10 context menus ** +;i %R:1215% ** "DisableImmersiveContextMenu"=dword:00000000 [-HKEY_CURRENT_USER\Software\Classes\CLSID\{056440FD-8568-48e7-A632-72157243B55B}\InprocServer32] -;d Disable navigation bar ** +;d %R:1216% ** @="" [HKEY_CURRENT_USER\Software\ExplorerPatcher] -;b Disable modern search bar +;b %R:1217% ;"Virtualized_{D17F1E1A-5919-4427-8F89-A1A8503CA3EB}_DisableModernSearchBar"=dword:00000000 [HKEY_CURRENT_USER\Software\ExplorerPatcher] -;b Shrink address bar height ** +;b %R:1218% ** "ShrinkExplorerAddressBar"=dword:00000000 [HKEY_CURRENT_USER\Software\ExplorerPatcher] -;b Hide search bar completely ** +;b %R:1219% ** "HideExplorerSearchBar"=dword:00000000 ;s Explorer_TitlebarSection !IsWindows11Version22H2OrHigher [HKEY_CURRENT_USER\Software\ExplorerPatcher] -;c 4 Title bar -;x 0 Show icon and title (default) -;x 1 Hide title, show icon -;x 2 Hide icon, show title -;x 3 Hide icon and title +;c 4 %R:1220% +;x 0 %R:1221% +;x 1 %R:1222% +;x 2 %R:1223% +;x 3 %R:1224% "HideIconAndTitleInExplorer"=dword:00000000 [HKEY_CURRENT_USER\Software\ExplorerPatcher] -;c 3 Apply Mica effect on these areas -;x 0 Let File Explorer decide (default) -;x 1 Title bar, command bar and navigation bar -;x 2 Nowhere +;c 3 %R:1225% +;x 0 %R:1226% +;x 1 %R:1227% +;x 2 %R:1228% "MicaEffectOnTitlebar"=dword:00000000 ;g Explorer_TitlebarSection -;T Start menu +;T %R:1301% [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced] -;z 2 Start menu style * -;x 0 Windows 11 (default) -;x 1 Windows 10 +;z 2 %R:1302% * +;x 0 %R:1303% +;x 1 %R:1304% "Start_ShowClassicMode"=dword:00000000 -;y More Start menu options in the Settings app 🡕 +;y %R:1305% 🡕 ;ms-settings:personalization-start [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced] -;c 2 Position on screen -;x 0 At screen edge -;x 1 Center (default) +;c 2 %R:1306% +;x 0 %R:1307% +;x 1 %R:1308% "TaskbarAl"=dword:00000001 [HKEY_CURRENT_USER\Software\ExplorerPatcher] -;c 22 Maximum number of frequent apps to show -;x 0 None +;z 22 %R:1309% +;x 0 %R:1310% ;x 1 1 ;x 2 2 ;x 3 3 ;x 4 4 ;x 5 5 -;x 6 6 (default) +;x 6 %R:1311% ;x 7 7 ;x 8 8 ;x 9 9 @@ -282,87 +280,87 @@ ;x 18 18 ;x 19 19 ;x 20 20 -;x 99999 Unlimited +;x 99999 %R:1312% ;"Virtualized_{D17F1E1A-5919-4427-8F89-A1A8503CA3EB}_Start_MaximumFrequentApps"=dword:00000006 [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\StartPage] -;a When using multiple displays, open Start on this monitor when invoked using -;c 10 the keyboard -;x 1 Primary monitor (default) -;x 0 Monitor on which the cursor is on -;x 2 Monitor #2 -;x 3 Monitor #3 -;x 4 Monitor #4 -;x 5 Monitor #5 -;x 6 Monitor #6 -;x 7 Monitor #7 -;x 8 Monitor #8 -;x 9 Monitor #9 +;a %R:1313% +;c 10 %R:1314% +;x 1 %R:1315% +;x 0 %R:1316% +;x 2 %R:1317% +;x 3 %R:1318% +;x 4 %R:1319% +;x 5 %R:1320% +;x 6 %R:1321% +;x 7 %R:1322% +;x 8 %R:1323% +;x 9 %R:1324% "MonitorOverride"=dword:00000001 ;s StartMenu_Windows11 !IsWindows10StartMenu [HKEY_CURRENT_USER\Software\ExplorerPatcher] -;b Disable the "Recommended" section +;b %R:1325% ;"Virtualized_{D17F1E1A-5919-4427-8F89-A1A8503CA3EB}_StartDocked_DisableRecommendedSection"=dword:00000000 [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\StartPage] -;b Open Start in All apps by default +;b %R:1326% "MakeAllAppsDefault"=dword:00000000 ;g StartMenu_Windows11 ;s StartMenu_Windows10 IsWindows10StartMenu [HKEY_CURRENT_USER\Software\ExplorerPatcher] -;b Show more tiles +;b %R:1327% ;"Virtualized_{D17F1E1A-5919-4427-8F89-A1A8503CA3EB}_StartUI_ShowMoreTiles"=dword:00000000 -;c 3 Corner preference -;x 1 Rounded corners, floating menu -;x 2 Rounded corners, docked menu -;x 0 Not rounded +;c 3 %R:1328% +;x 1 %R:1329% +;x 2 %R:1330% +;x 0 %R:1331% ;"Virtualized_{D17F1E1A-5919-4427-8F89-A1A8503CA3EB}_StartUI_EnableRoundedCorners"=dword:00000000 [HKEY_CURRENT_USER\Software\ExplorerPatcher] -;c 3 Display mode -;x 0 Default -;x 1 Start menu -;x 2 Full screen Start +;c 3 %R:1332% +;x 0 %R:1333% +;x 1 %R:1334% +;x 2 %R:1335% ;"Virtualized_{D17F1E1A-5919-4427-8F89-A1A8503CA3EB}_ForceStartSize"=dword:00000000 -;c 3 App list -;x 0 Display -;x 3 Hide -;x 1 Disable +;c 3 %R:1336% +;x 0 %R:1337% +;x 3 %R:1338% +;x 1 %R:1339% ;"Virtualized_{D17F1E1A-5919-4427-8F89-A1A8503CA3EB}_NoStartMenuMorePrograms"=dword:00000000 -;y IMPORTANT, MUST READ: Notice regarding this feature (online) +;y %R:1340% ;https://github.com/valinet/ExplorerPatcher/discussions/1679 ;g StartMenu_Windows10 -;T Window switcher +;T %R:1401% [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer] -;z 4 Window switcher (Alt+Tab) style * -;x 0 Windows 11 (default) -;x 3 Windows 10 -;x 1 Windows NT -;x 2 Simple Window Switcher +;z 4 %R:1402% * +;x 0 %R:1403% +;x 3 %R:1405% +;x 1 %R:1406% +;x 2 %R:1407% "AltTabSettings"=dword:00000000 ;s WindowSwitcher_SWS IsSWSEnabled [HKEY_CURRENT_USER\Software\ExplorerPatcher\sws] -;b Show the desktop as the last window in the interaction list +;b %R:1408% "IncludeWallpaper"=dword:00000001 -;b Always display switcher on primary monitor +;b %R:1409% "PrimaryOnly"=dword:00000000 -;b Display windows only from the monitor containing the cursor +;b %R:1410% "PerMonitor"=dword:00000000 -;b Group windows of the same app +;b %R:1411% "SwitcherIsPerApplication"=dword:00000000 ;b %PLACEHOLDER_0001% "NoPerApplicationList"=dword:00000000 -;c 3 Theme -;x 0 Default -;x 1 Acrylic -;x 2 Mica (always opaque) +;c 3 %R:1413% +;x 0 %R:1414% +;x 1 %R:1415% +;x 2 %R:1416% "Theme"=dword:00000000 [HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MultitaskingView\AltTabViewHost] -;c 19 Opacity -;x 100 Opaque +;c 19 %R:1417% +;x 100 %R:1418% ;x 98 98 % ;x 96 96 % -;x 95 95 % (default) +;x 95 %R:1419% ;x 94 94 % ;x 92 92 % ;x 90 90 % @@ -380,19 +378,19 @@ ;x 30 30 % "Grid_backgroundPercent"=dword:0000005F [HKEY_CURRENT_USER\Software\ExplorerPatcher\sws] -;c 3 Color scheme -;x 0 Follow system setting (default) -;x 1 Light -;x 2 Dark +;c 3 %R:1420% +;x 0 %R:1421% +;x 1 %R:1422% +;x 2 %R:1423% "ColorScheme"=dword:00000000 [HKEY_CURRENT_USER\Software\ExplorerPatcher\sws] -;c 3 Corner preference -;x 2 Rounded (default) -;x 3 Small rounded -;x 1 Not rounded +;c 3 %R:1424% +;x 2 %R:1425% +;x 3 %R:1426% +;x 1 %R:1427% "CornerPreference"=dword:00000002 [HKEY_CURRENT_USER\Software\ExplorerPatcher\sws] -;c 20 Row height +;c 20 %R:1428% ;x 330 330 pt ;x 320 320 pt ;x 310 310 pt @@ -403,7 +401,7 @@ ;x 260 260 pt ;x 250 250 pt ;x 240 240 pt -;x 230 230 pt (default) +;x 230 %R:1429% ;x 220 220 pt ;x 210 210 pt ;x 200 200 pt @@ -414,134 +412,134 @@ ;x 150 150 pt ;x 140 140 pt "RowHeight"=dword:000000e6 -;c 10 Maximum width (percentage of screen width) -;x 100 100 % (not recommended) +;c 10 %R:1430% +;x 100 %R:1431% ;x 95 95 % ;x 90 90 % ;x 85 85 % -;x 80 80 % (default) +;x 80 %R:1432% ;x 75 75 % ;x 70 70 % ;x 65 65 % ;x 60 60 % ;x 55 55 % "MaxWidth"=dword:00000050 -;c 10 Maximum height (percentage of screen height) -;x 100 100 % (not recommended) +;c 10 %R:1433% +;x 100 %R:1434% ;x 95 95 % ;x 90 90 % ;x 85 85 % -;x 80 80 % (default) +;x 80 %R:1435% ;x 75 75 % ;x 70 70 % ;x 65 65 % ;x 60 60 % ;x 55 55 % "MaxHeight"=dword:00000050 -;c 11 Window padding +;c 11 %R:1436% ;x 50 50 pt ;x 45 45 pt ;x 40 40 pt ;x 35 30 pt ;x 30 30 pt ;x 25 25 pt -;x 20 20 pt (default) +;x 20 %R:1437% ;x 15 15 pt ;x 10 10 pt ;x 5 5 pt -;x 0 None +;x 0 %R:1438% "MasterPadding"=dword:00000014 -;c 11 Show delay -;x 0 None -;x 25 25 ms -;x 50 50 ms -;x 75 75 ms -;x 100 100 ms (default) -;x 125 125 ms -;x 150 150 ms -;x 200 200 ms -;x 300 300 ms -;x 400 400 ms -;x 500 500 ms +;c 11 %R:1439% +;x 0 %R:1440% +;x 25 %R:1441% +;x 50 %R:1442% +;x 75 %R:1443% +;x 100 %R:1444% +;x 125 %R:1445% +;x 150 %R:1446% +;x 200 %R:1447% +;x 300 %R:1448% +;x 400 %R:1449% +;x 500 %R:1450% "ShowDelay"=dword:00000064 -;c 3 Use the scroll wheel to change selection -;x 0 Never (default) -;x 1 When cursor is over the switcher -;x 2 Always +;c 3 %R:1451% +;x 0 %R:1452% +;x 1 %R:1453% +;x 2 %R:1454% "ScrollWheelBehavior"=dword:00000000 ;q -;y Learn more about Simple Window Switcher 🡕 +;y %R:1455% 🡕 ;https://github.com/valinet/ExplorerPatcher/wiki/Simple-Window-Switcher ;g WindowSwitcher_SWS ;s Weather_Windows10 IsOldTaskbar -;T Weather +;T %R:1501% [HKEY_CURRENT_USER\Software\ExplorerPatcher] -;b Show Weather on the taskbar +;b %R:1502% ;"Virtualized_{D17F1E1A-5919-4427-8F89-A1A8503CA3EB}_PeopleBand"=dword:00000000 ;s Weather_Section1 IsWeatherEnabled -;w Location -;Search City or Zip Code; the program looks up "weather in /* what you typed */" on Google. Leave blank for the default value (current location). -;Current location (default) +;w %R:1503% +;%R:1504% +;%R:1505% "WeatherLocation"="" -;c 5 Layout -;x 0 Icon and description (default) -;x 3 Icon and temperature -;x 1 Icon only -;x 4 Temperature only -;x 5 Temperature and description +;c 5 %R:1506% +;x 0 %R:1507% +;x 3 %R:1508% +;x 1 %R:1509% +;x 4 %R:1510% +;x 5 %R:1511% "WeatherViewMode"=dword:00000000 -;c 3 Widget size -;x 0 Automatic (fit contents) (default) -;x 2 Automatic (fit contents) with threshold -;x 1 Fixed +;c 3 %R:1512% +;x 0 %R:1513% +;x 2 %R:1514% +;x 1 %R:1515% "WeatherFixedSize"=dword:00000000 -;c 2 Widget position -;x 0 Right / bottom (default) -;x 1 Left / top +;c 2 %R:1516% +;x 0 %R:1517% +;x 1 %R:1518% "WeatherToLeft"=dword:00000000 -;c 7 Update frequency -;x 60 Every minute -;x 300 Every 5 minutes -;x 900 Every 15 minutes -;x 1200 Every 20 minutes (default) -;x 1800 Every half an hour -;x 3600 Every hour -;x 7200 Every couple of hours +;c 7 %R:1519% +;x 60 %R:1520% +;x 300 %R:1521% +;x 900 %R:1522% +;x 1200 %R:1523% +;x 1800 %R:1524% +;x 3600 %R:1525% +;x 7200 %R:1526% "WeatherContentUpdateMode"=dword:000004B0 -;c 2 Temperature unit -;x 0 Celsius (default) -;x 1 Fahrenheit +;c 2 %R:1527% +;x 0 %R:1528% +;x 1 %R:1529% "WeatherTemperatureUnit"=dword:00000000 ;;;c 2 Location accuracy ;;;x 0 Generic (based on the IP address) (default) ;;;x 1 Precise (geolocation) ;;"WeatherLocationType"=dword:00000000 -;w Language -;Type the short code for the language you'd like the weather data to be displayed in. For example, try "en", "ro", "de", "fr" etc. Leave blank for the default value (language of the Windows OS). -;System language (default) +;w %R:1533% +;%R:1534% +;%R:1535% "WeatherLanguage"="" -;c 3 Color scheme -;x 0 Follow system setting (default) -;x 1 Light -;x 2 Dark +;c 3 %R:1536% +;x 0 %R:1537% +;x 1 %R:1538% +;x 2 %R:1539% "WeatherTheme"=dword:00000000 -;c 3 Corner preference -;x 2 Rounded (default) -;x 3 Small rounded -;x 1 Not rounded +;c 3 %R:1540% +;x 2 %R:1541% +;x 3 %R:1542% +;x 1 %R:1543% "WeatherWindowCornerPreference"=dword:00000002 -;c 2 Icon pack -;x 0 Microsoft (default) -;x 1 Google +;c 2 %R:1544% +;x 0 %R:1545% +;x 1 %R:1546% "WeatherIconPack"=dword:00000000 -;c 2 Display widget contents -;x 0 On a single line (default) -;x 1 On 2 lines, if possible +;c 2 %R:1547% +;x 0 %R:1548% +;x 1 %R:1549% "WeatherContentsMode"=dword:00000000 -;c 17 Zoom +;c 17 %R:1550% ;x 25 25 % ;x 33 33 % ;x 50 50 % @@ -549,7 +547,7 @@ ;x 75 75 % ;x 80 80 % ;x 90 90 % -;x 0 100 % (default) +;x 0 %R:1551% ;x 110 110 % ;x 125 125 % ;x 150 150 % @@ -562,13 +560,13 @@ "WeatherZoomFactor"=dword:00000000 ;q ;g Weather_Section1 -;y Learn more about the Weather taskbar widget 🡕 +;y %R:1552% 🡕 ;https://github.com/valinet/ExplorerPatcher/wiki/Weather ;s Weather_Section2 IsWeatherEnabled ;t %WEATHERLASTUPDATETEXT% -;u Update weather now +;u %R:1554% ;update_weather -;u Clear weather widget local data +;u %R:1555% ;clear_data_weather ;g Weather_Section2 ;g Weather_Windows10 @@ -577,32 +575,32 @@ ;s Spotlight_SpotlightOSCheck DoesOSBuildSupportSpotlight ;s Spotlight_SpotlightEnabledCheck IsSpotlightEnabled -;T Spotlight +;T %R:1601% [HKEY_CURRENT_USER\Software\ExplorerPatcher] -;b Hide the "Learn about this picture" icon +;b %R:1602% "SpotlightDisableIcon"=dword:00000000 -;c 8 Desktop context menu items -;x 0 No items -;x 32 Switch to the next picture -;x 48 Learn about and switch to next picture -;x 288 Info and switch to next picture -;x 800 Info, copyright, and switch to next picture -;x 304 Info, learn about, and switch to next picture -;x 816 Info, copyright, learn about, and switch to next picture -;x 1008 All items +;c 8 %R:1603% +;x 0 %R:1604% +;x 32 %R:1605% +;x 48 %R:1606% +;x 288 %R:1607% +;x 800 %R:1608% +;x 304 %R:1609% +;x 816 %R:1610% +;x 1008 %R:1611% "SpotlightDesktopMenuMask"=dword:00000000 -;c 11 Update frequency -;x 0 Let Windows decide the best schedule (default) -;x 60 Every minute -;x 300 Every 5 minutes -;x 900 Every 15 minutes -;x 1200 Every 20 minutes -;x 1800 Every half an hour -;x 3600 Every hour -;x 7200 Every couple of hours -;x 21600 Every 6 hours -;x 43200 Every 12 hours -;x 86400 Once a day +;c 11 %R:1612% +;x 0 %R:1613% +;x 60 %R:1614% +;x 300 %R:1615% +;x 900 %R:1616% +;x 1200 %R:1617% +;x 1800 %R:1618% +;x 3600 %R:1619% +;x 7200 %R:1620% +;x 21600 %R:1621% +;x 43200 %R:1622% +;x 86400 %R:1623% "SpotlightUpdateSchedule"=dword:00000000 ;u %SPOTLIGHTCLICK% ;spotlight_click @@ -614,7 +612,7 @@ ;spotlight_like ;u %SPOTLIGHTDISLIKE% ;spotlight_dislike -;;;u Show more options +;;;u %R:1624% ;;;spotlight_menu ;g Spotlight_SpotlightEnabledCheck ;g Spotlight_SpotlightOSCheck @@ -622,170 +620,163 @@ -;T Other +;T %R:1701% [HKEY_CURRENT_USER\Software\ExplorerPatcher] -;b Remember last used section in this window +;b %R:1702% "LastSectionInProperties"=dword:00000000 -;b Open clock flyout when pressing Win+C instead of Microsoft Teams * +;b %R:1703% * "ClockFlyoutOnWinC"=dword:00000000 -;b Show separators between taskbar toolbars * +;b %R:1704% * "ToolbarSeparators"=dword:00000000 [HKEY_CURRENT_USER\Software\ExplorerPatcher] -;b Add shortcut to program settings in Win+X menu +;b %R:1705% "PropertiesInWinX"=dword:00000000 -;b Remove shortcut key from program settings item in Win+X menu +;b %R:1707% "NoMenuAccelerator"=dword:00000000 -;b Disable Office hotkeys (Ctrl+Alt+Shift+Windows key combinations) * +;b %R:1708% * "DisableOfficeHotkeys"=dword:00000000 -;b Disable Win+F (Feedback Hub) hotkey * +;b %R:1709% * "DisableWinFHotkey"=dword:00000000 -;b Disable rounded corners for application windows +;b %R:1710% ;"Virtualized_{D17F1E1A-5919-4427-8F89-A1A8503CA3EB}_DisableRoundedCorners"=dword:00000000 [HKEY_CURRENT_USER\Software\ExplorerPatcher] -;b Disable quadrants when snapping windows * +;b %R:1711% * "DisableAeroSnapQuadrants"=dword:00000000 ;s Other_SnapAssistStyle !IsWindows11Version22H2OrHigher [HKEY_CURRENT_USER\Software\ExplorerPatcher] -;c 2 Snap Assist style -;x 0 Windows 11 (default) -;x 3 Windows 10 +;c 2 %R:1712% +;x 0 %R:1713% +;x 3 %R:1714% "SnapAssistSettings"=dword:00000000 ;g Other_SnapAssistStyle [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced] -;c 6 Default action in the Alt+F4 dialog on the desktop -;x 256 Switch user -;x 1 Sign out -;x 16 Sleep -;x 64 Hibernate -;x 2 Shut down (default) -;x 4 Restart +;c 6 %R:1715% +;x 256 %R:1716% +;x 1 %R:1717% +;x 16 %R:1718% +;x 64 %R:1719% +;x 2 %R:1720% +;x 4 %R:1721% "Start_PowerButtonAction"=dword:00000002 -;t Prevent the following Control Panel links from being redirected to the Settings app: +;t %R:1722% [HKEY_CURRENT_USER\Software\ExplorerPatcher] -;b System / About page +;b %R:1723% "DoNotRedirectSystemToSettingsApp"=dword:00000000 -;b Programs and Features +;b %R:1724% "DoNotRedirectProgramsAndFeaturesToSettingsApp"=dword:00000000 -;b Adjust date/time +;b %R:1725% "DoNotRedirectDateAndTimeToSettingsApp"=dword:00000000 -;b Customize notification icons +;b %R:1726% "DoNotRedirectNotificationIconsToSettingsApp"=dword:00000000 - -;T Updates +;T %R:1801% [HKEY_CURRENT_USER\Software\ExplorerPatcher] -;z 3 When File Explorer starts -;x 1 Notify about available updates (default) -;x 0 Prompt to install available updates -;x 2 Do not check for updates +;z 3 %R:1802% +;x 1 %R:1803% +;x 0 %R:1804% +;x 2 %R:1805% "UpdatePolicy"=dword:00000001 -;b Receive pre-release versions, if available (not recommended) +;b %R:1806% "UpdatePreferStaging"=dword:00000000 -;b Suggest the latest version on the server, even if it's older (not recommended) +;b %R:1807% "UpdateAllowDowngrades"=dword:00000000 -;t Update servers: -;w Releases -;Type a URL that serves resources adhering to GitHub's releases API. To learn how to configure your own update server, please consult the wiki. +;t %R:1808% +;w %R:1809% +;%R:1810% ;github.com/valinet/ExplorerPatcher/releases/latest "UpdateURL"="" -;w Pre-releases -;Type a URL that serves resources adhering to GitHub's pre-releases API. To learn how to configure your own update server, please consult the wiki. +;w %R:1811% +;%R:1812% ;api.github.com/repos/valinet/ExplorerPatcher/releases?per_page=1 "UpdateURLStaging"="" -;y Check for updates +;y %R:1813% ;;;EP_CHECK_FOR_UPDATES -;y Update program and restart File Explorer +;y %R:1814% ;;;EP_INSTALL_UPDATES -;y Read about changes in the latest releases 🡕 +;y %R:1815% 🡕 ;https://github.com/valinet/ExplorerPatcher/blob/master/CHANGELOG.md -;y Learn more 🡕 +;y %R:1816% 🡕 ;https://github.com/valinet/ExplorerPatcher/wiki/Configure-updates -;T Advanced -;e Only change these settings after reading the documentation about them. -;y Learn more 🡕 +;T %R:1901% +;e %R:1902% +;y %R:1903% 🡕 ;https://github.com/valinet/ExplorerPatcher/wiki/About-advanced-settings ;q [HKEY_CURRENT_USER\Software\ExplorerPatcher] -;b Enable console +;b %R:1904% "AllocConsole"=dword:00000000 -;b Dump memory leaks +;b %R:1905% "Memcheck"=dword:00000000 -;b Double click taskbar to toggle auto-hide (only works when the taskbar is locked) +;b %R:1906% "TaskbarAutohideOnDoubleClick"=dword:00000000 [HKEY_CURRENT_USER\Control Panel\Desktop] -;b Show Windows build info on the desktop * +;b %R:1907% * "PaintDesktopVersion"=dword:00000000 [HKEY_CURRENT_USER\Software\ExplorerPatcher] -;b Enable advanced mitigations for correct rendering using classic theme * +;b %R:1908% * "ClassicThemeMitigations"=dword:00000000 [-HKEY_CURRENT_USER\Software\Classes\CLSID\{1eeb5b5a-06fb-4732-96b3-975c0194eb39}\InprocServer32] -;d Enable SysListView32 for Explorer views * +;d %R:1909% * @="" [HKEY_CURRENT_USER\Software\ExplorerPatcher] -;b Do not change the taskbar context menu (e.g. do not display the "Properties" item) +;b %R:1910% "NoPropertiesInContextMenu"=dword:00000000 -;b Enable symbols download * +;b %R:1911% * "EnableSymbolDownload"=dword:00000001 ;s Advanced_Windows10 IsOldTaskbar -;b Pinned items act as quick launch (don't group pinned items with active apps) * +;b %R:1912% * "PinnedItemsActAsQuickLaunch"=dword:00000000 -;b When the taskbar shows button labels, remove the extra gap around pinned items * +;b %R:1913% * "RemoveExtraGapAroundPinnedItems"=dword:00000000 ;g Advanced_Windows10 -;c 12 Supplementary delay at logon * -;x 0 None (default) -;x 300 300 ms -;x 600 600 ms -;x 1000 1 second -;x 1500 1.5 seconds -;x 2000 2 seconds -;x 3000 3 seconds -;x 4000 4 seconds -;x 5000 5 seconds -;x 6000 6 seconds -;x 8000 8 seconds -;x 10000 10 seconds +;c 12 %R:1914% * +;x 0 %R:1915% +;x 300 %R:1916% +;x 600 %R:1917% +;x 1000 %R:1918% +;x 1500 %R:1919% +;x 2000 %R:1920% +;x 3000 %R:1921% +;x 4000 %R:1922% +;x 5000 %R:1923% +;x 6000 %R:1924% +;x 8000 %R:1925% +;x 10000 %R:1926% "ExplorerReadyDelay"=dword:00000000 -;T About -;e ExplorerPatcher -;e Version %VERSIONINFORMATIONSTRING% +;T %R:2001% +;e %R:201% +;e %VERSIONINFORMATIONSTRING% ;t © 2006-2023 VALINET Solutions SRL. All rights reserved. ;e -;e This project aims to enhance the working environment on Windows. -;e Proudly engineered by Valentin-Gabriel Radu. -;t Running on Windows 11, OS Build %OSVERSIONSTRING% -;y Visit project GitHub (https://github.com/valinet) 🡕 +;e %R:2003% +;e %R:2004% +;t %OSVERSIONSTRING% +;y %R:2006% (https://github.com/valinet) 🡕 ;https://github.com/valinet ;q -;y Visit web site (https://www.valinet.ro) 🡕 +;y %R:2007% (https://www.valinet.ro) 🡕 ;https://www.valinet.ro -;y E-mail author (valentingabrielradu@gmail.com) 🡕 -;mailto:valentingabrielradu@gmail.com -;y Donate (using PayPal) 🡕 +;y %R:2009% 🡕 ;https://www.paypal.com/donate?business=valentingabrielradu%40gmail.com&no_recurring=0&item_name=ExplorerPatcher¤cy_code=EUR -;y Frequently Asked Questions 🡕 +;y %R:2010% 🡕 ;https://github.com/valinet/ExplorerPatcher/wiki/Frequently-asked-questions -;y Learn more managing these settings 🡕 +;y %R:2011% 🡕 ;https://github.com/valinet/ExplorerPatcher/wiki/Settings-management -;u Import settings +;u %R:2012% ;import -;u Export current settings +;u %R:2013% ;export -;u Restore default settings +;u %R:2014% ;reset ;f -;u Restart File Explorer (*) +;u %R:2101% (*) ;restart -;;u Restore default settings -;;reset -;;u About ExplorerPatcher -;;about diff --git a/ep_gui/resources/settings10.reg b/ep_gui/resources/settings10.reg index 25c78aa5c..2bb6589df 100644 --- a/ep_gui/resources/settings10.reg +++ b/ep_gui/resources/settings10.reg @@ -4,198 +4,194 @@ ;M Settings ;q -;T Taskbar +;T %R:1001% [HKEY_CURRENT_USER\Software\ExplorerPatcher] -;y More taskbar options in the Settings app 🡕 +;y %R:1005% 🡕 ;ms-settings:taskbar -;y Customize notification area icons 🡕 +;y %R:1006% 🡕 ;shell:::{05d7b0f4-2121-4eff-bf6b-ed3f69b894d9} -;y Customize system icons in the notification area 🡕 +;y %R:1007% 🡕 ;shell:::{05d7b0f4-2121-4eff-bf6b-ed3f69b894d9}\SystemIcons [HKEY_CURRENT_USER\Software\ExplorerPatcher] -;c 4 Primary taskbar location on screen * -;x 3 Bottom (default) -;x 1 Top -;x 0 Left -;x 2 Right +;c 4 %R:1008% * +;x 3 %R:1009% +;x 1 %R:1010% +;x 0 %R:1011% +;x 2 %R:1012% ;"Virtualized_{D17F1E1A-5919-4427-8F89-A1A8503CA3EB}_TaskbarPosition"=dword:00000003 -;c 4 Secondary taskbar(s) location on screen -;x 3 Bottom (default) -;x 1 Top -;x 0 Left -;x 2 Right +;c 4 %R:1013% +;x 3 %R:1009% +;x 1 %R:1010% +;x 0 %R:1011% +;x 2 %R:1012% ;"Virtualized_{D17F1E1A-5919-4427-8F89-A1A8503CA3EB}_MMTaskbarPosition"=dword:00000003 [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Search] -;c 3 Search -;x 0 Hidden -;x 1 Show search icon -;x 2 Show search box +;c 3 %R:1019% +;x 0 %R:1020% +;x 1 %R:1021% +;x 2 %R:1022% "SearchboxTaskbarMode"=dword:00000001 [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced] -;b Show Cortana button +;b %R:1023% "ShowCortanaButton"=dword:00000000 [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced] -;b Show Task view button +;b %R:1024% "ShowTaskViewButton"=dword:00000001 [HKEY_CURRENT_USER\Software\ExplorerPatcher] -;b Automatically hide the taskbar +;b %R:1026% ;"Virtualized_{D17F1E1A-5919-4427-8F89-A1A8503CA3EB}_AutoHideTaskbar"=dword:00000000 [HKEY_CURRENT_USER\Software\ExplorerPatcher] -;c 2 Start button style * -;x 0 Windows 10 (default) -;x 1 Windows 11 +;c 2 %R:1027% * +;x 0 %R:1028% +;x 1 %R:1029% "OrbStyle"=dword:00000000 -;c 5 Primary taskbar alignment -;x 0 At screen edge (default) -;x 1 Centered -;x 5 Centered, at screen edge when full -;x 3 Centered with Start button -;x 7 Centered with Start button, at screen edge when full +;c 5 %R:1030% +;x 0 %R:1031% +;x 1 %R:1032% +;x 5 %R:1033% +;x 3 %R:1034% +;x 7 %R:1035% "OldTaskbarAl"=dword:00000000 -;c 5 Secondary taskbar(s) alignment -;x 0 At screen edge (default) -;x 1 Centered -;x 5 Centered, at screen edge when full -;x 3 Centered with Start button -;x 7 Centered with Start button, at screen edge when full +;c 5 %R:1036% +;x 0 %R:1031% +;x 1 %R:1032% +;x 5 %R:1033% +;x 3 %R:1034% +;x 7 %R:1035% "MMOldTaskbarAl"=dword:00000000 [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced] -;c 3 Combine taskbar icons on primary taskbar -;x 0 Always combine (default) -;x 1 Combine when taskbar is full -;x 2 Never combine +;c 3 %R:1037% +;x 0 %R:1038% +;x 1 %R:1040% +;x 2 %R:1042% "TaskbarGlomLevel"=dword:00000000 -;c 3 Combine taskbar icons on secondary taskbar(s) -;x 0 Always combine (default) -;x 1 Combine when taskbar is full -;x 2 Never combine +;c 3 %R:1043% +;x 0 %R:1038% +;x 1 %R:1040% +;x 2 %R:1042% "MMTaskbarGlomLevel"=dword:00000000 -;c 2 Taskbar icon size -;x 1 Small -;x 0 Large (default) +;c 2 %R:1044% +;x 1 %R:1045% +;x 0 %R:1046% "TaskbarSmallIcons"=dword:00000000 -;e -;e -;e -;e -;T System tray +;T %R:1101% [HKEY_CURRENT_USER\Software\ExplorerPatcher] -;b Skin taskbar and tray pop-up menus +;b %R:1102% "SkinMenus"=dword:00000001 -;b Center tray icon pop-up menus +;b %R:1103% "CenterMenus"=dword:00000001 -;b Flyout behavior for tray icon pop-up menus +;b %R:1104% "FlyoutMenus"=dword:00000001 [HKEY_CURRENT_USER\Software\Microsoft\TabletTip\1.7] -;b Show touch keyboard button * +;b %R:1105% * "TipbandDesiredVisibility"=dword:00000000 -[HKEY_CURRENT_USER\Software\ExplorerPatcher] -;p 2 -;b Apply Windows 11 style to system tray icons * -"SkinIcons"=dword:00000001 [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced] -;b Show seconds in the clock +;b %R:1106% "ShowSecondsInSystemClock"=dword:00000000 [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced] -;c 3 Show desktop button -;x 1 Enabled (default) -;x 0 Disabled -;x 2 Hidden +;c 3 %R:1108% +;x 1 %R:1109% +;x 0 %R:1110% +;x 2 %R:1111% "TaskbarSD"=dword:00000001 [HKEY_CURRENT_USER\Software\ExplorerPatcher] -;a Choosing 'Open Network && Internet settings' when right clicking the -;c 3 network icon should open: -;x 0 Network section in the Settings app (default) -;x 1 Network and Sharing Center in Control Panel -;x 2 Network Connections in Control Panel +;p 2 +;b %R:1112% * +"SkinIcons"=dword:00000001 +[HKEY_CURRENT_USER\Software\ExplorerPatcher] +;a %R:1113% +;c 3 %R:1114% +;x 0 %R:1115% +;x 1 %R:1116% +;x 2 %R:1117% "ReplaceNetwork"=dword:00000000 ;q -;t When clicking a system icon in the system tray, open: +;t %R:1118% [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Control Panel\Settings\Network] -;c 5 Network -;x 0 Windows 10 flyout (default) -;x 2 Windows 8 flyout -;x 1 Network section in the Settings app -;x 3 Network and Sharing Center in Control Panel -;x 4 Network Connections in Control Panel +;c 5 %R:1119% +;x 0 %R:1122% +;x 2 %R:1123% +;x 1 %R:1124% +;x 3 %R:1116% +;x 4 %R:1117% "ReplaceVan"=dword:00000000 [HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\MTCUVC] -;c 2 Sound -;x 1 Windows 10 flyout (default) -;x 0 Windows 7 flyout +;c 2 %R:1125% +;x 1 %R:1126% +;x 0 %R:1127% "EnableMtcUvc"=dword:00000001 [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ImmersiveShell] -;c 3 Clock -;x 0 Windows 10 flyout (default) -;x 1 Windows 7 -;x 2 Action Center +;c 3 %R:1128% +;x 0 %R:1130% +;x 1 %R:1131% +;x 2 %R:1132% "UseWin32TrayClockExperience"=dword:00000000 [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ImmersiveShell] -;c 2 Battery -;x 0 Windows 10 flyout (default) -;x 1 Windows 7 +;c 2 %R:1133% +;x 0 %R:1134% +;x 1 %R:1135% "UseWin32BatteryFlyout"=dword:00000000 -;T File Explorer -;e For the settings marked with (**) to work in Open or Save file dialogs as well, register -;e this utility as shell extension using the option below. -;y Learn more 🡕 +;T %R:1201% +;e %R:1202% +;e %R:1203% +;y %R:1204% 🡕 ;https://github.com/valinet/ExplorerPatcher/wiki/Using-ExplorerPatcher-as-shell-extension ;q [HKEY_CURRENT_USER\Software\ExplorerPatcher] -;b Register as shell extension +;b %R:1205% ;"Virtualized_{D17F1E1A-5919-4427-8F89-A1A8503CA3EB}_RegisterAsShellExtension"=dword:00000000 [HKEY_CURRENT_USER\Software\ExplorerPatcher] -;b Always use legacy file transfer dialog +;b %R:1207% "LegacyFileTransferDialog"=dword:00000000 [HKEY_CURRENT_USER\Software\ExplorerPatcher] -;b Use classic drive groupings in This PC +;b %R:1208% "UseClassicDriveGrouping"=dword:00000000 [HKEY_CURRENT_USER\Software\ExplorerPatcher] -;c 2 Control Interface -;x 0 Windows 10 Ribbon (default) -;x 2 Windows 7 Command Bar +;c 2 %R:1209% +;x 0 %R:1211% +;x 2 %R:1213% "FileExplorerCommandUI"=dword:00000000 -;t The following settings take effect on newly created File Explorer windows: +;t %R:1214% [HKEY_CURRENT_USER\Software\ExplorerPatcher] -;i Use immersive menus when displaying Windows 10 context menus ** +;i %R:1215% ** "DisableImmersiveContextMenu"=dword:00000000 [-HKEY_CURRENT_USER\Software\Classes\CLSID\{056440FD-8568-48e7-A632-72157243B55B}\InprocServer32] -;d Disable navigation bar ** +;d %R:1216% ** @="" [HKEY_CURRENT_USER\Software\ExplorerPatcher] -;b Disable modern search bar +;b %R:1217% ;"Virtualized_{D17F1E1A-5919-4427-8F89-A1A8503CA3EB}_DisableModernSearchBar"=dword:00000000 [HKEY_CURRENT_USER\Software\ExplorerPatcher] -;b Shrink address bar height ** +;b %R:1218% ** "ShrinkExplorerAddressBar"=dword:00000000 [HKEY_CURRENT_USER\Software\ExplorerPatcher] -;b Hide search bar completely ** +;b %R:1219% ** "HideExplorerSearchBar"=dword:00000000 ;p 2 ;b Mica effect on title bar "MicaEffectOnTitlebar"=dword:00000000 -;T Start menu -;y More Start menu options in the Settings app 🡕 +;T %R:1301% +;y %R:1305% 🡕 ;ms-settings:personalization-start [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced] -;z 2 Position on screen -;x 0 At screen edge (default) -;x 1 Center +;z 2 %R:1306% +;x 0 %R:1307% +;x 1 %R:1308% "TaskbarAl"=dword:00000000 [HKEY_CURRENT_USER\Software\ExplorerPatcher] -;z 22 Maximum number of frequent apps to show -;x 0 None +;z 22 %R:1309% +;x 0 %R:1310% ;x 1 1 ;x 2 2 ;x 3 3 ;x 4 4 ;x 5 5 -;x 6 6 (default) +;x 6 %R:1311% ;x 7 7 ;x 8 8 ;x 9 9 @@ -210,71 +206,71 @@ ;x 18 18 ;x 19 19 ;x 20 20 -;x 99999 Unlimited +;x 99999 %R:1312% ;"Virtualized_{D17F1E1A-5919-4427-8F89-A1A8503CA3EB}_Start_MaximumFrequentApps"=dword:00000006 [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\StartPage] -;e When using multiple displays, open Start on this monitor when invoked using -;z 10 the keyboard -;x 1 Primary monitor (default) -;x 0 Monitor on which the cursor is on -;x 2 Monitor #2 -;x 3 Monitor #3 -;x 4 Monitor #4 -;x 5 Monitor #5 -;x 6 Monitor #6 -;x 7 Monitor #7 -;x 8 Monitor #8 -;x 9 Monitor #9 +;e %R:1313% +;z 10 %R:1314% +;x 1 %R:1315% +;x 0 %R:1316% +;x 2 %R:1317% +;x 3 %R:1318% +;x 4 %R:1319% +;x 5 %R:1320% +;x 6 %R:1321% +;x 7 %R:1322% +;x 8 %R:1323% +;x 9 %R:1324% "MonitorOverride"=dword:00000001 [HKEY_CURRENT_USER\Software\ExplorerPatcher] -;z 3 Corner preference -;x 1 Rounded corners, floating menu -;x 2 Rounded corners, docked menu -;x 0 Not rounded +;z 3 %R:1328% +;x 1 %R:1329% +;x 2 %R:1330% +;x 0 %R:1331% ;"Virtualized_{D17F1E1A-5919-4427-8F89-A1A8503CA3EB}_StartUI_EnableRoundedCorners"=dword:00000000 [HKEY_CURRENT_USER\Software\ExplorerPatcher] -;z 3 Display mode -;x 0 Default -;x 1 Start menu -;x 2 Full screen Start +;z 3 %R:1332% +;x 0 %R:1333% +;x 1 %R:1334% +;x 2 %R:1335% ;"Virtualized_{D17F1E1A-5919-4427-8F89-A1A8503CA3EB}_ForceStartSize"=dword:00000000 -;z 3 App list -;x 0 Display -;x 3 Hide -;x 1 Disable +;z 3 %R:1336% +;x 0 %R:1337% +;x 3 %R:1338% +;x 1 %R:1339% ;"Virtualized_{D17F1E1A-5919-4427-8F89-A1A8503CA3EB}_NoStartMenuMorePrograms"=dword:00000000 -;t Some settings might not be available in older Windows 10 versions. +;t %R:1341% -;T Window switcher +;T %R:1401% [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer] -;z 3 Window switcher (Alt+Tab) style * -;x 0 Windows 10 (default) -;x 1 Windows NT -;x 2 Simple Window Switcher +;z 3 %R:1402% * +;x 0 %R:1404% +;x 1 %R:1406% +;x 2 %R:1407% "AltTabSettings"=dword:00000000 -;t The following settings only apply to the Simple Window Switcher: +;s WindowSwitcher_SWS IsSWSEnabled [HKEY_CURRENT_USER\Software\ExplorerPatcher\sws] -;b Show the desktop as the last window in the interaction list +;b %R:1408% "IncludeWallpaper"=dword:00000001 -;b Always display switcher on primary monitor +;b %R:1409% "PrimaryOnly"=dword:00000000 -;b Display windows only from the monitor containing the cursor +;b %R:1410% "PerMonitor"=dword:00000000 -;b Group windows of the same app +;b %R:1411% "SwitcherIsPerApplication"=dword:00000000 ;b %PLACEHOLDER_0001% "NoPerApplicationList"=dword:00000000 -;c 2 Theme -;x 0 Default -;x 1 Acrylic +;c 2 %R:1413% +;x 0 %R:1414% +;x 1 %R:1415% "Theme"=dword:00000000 [HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MultitaskingView\AltTabViewHost] -;c 19 Opacity -;x 100 Opaque +;c 19 %R:1417% +;x 100 %R:1418% ;x 98 98 % ;x 96 96 % -;x 95 95 % (default) +;x 95 %R:1419% ;x 94 94 % ;x 92 92 % ;x 90 90 % @@ -292,13 +288,13 @@ ;x 30 30 % "Grid_backgroundPercent"=dword:0000005F [HKEY_CURRENT_USER\Software\ExplorerPatcher\sws] -;c 3 Color scheme -;x 0 Follow system setting (default) -;x 1 Light -;x 2 Dark +;c 3 %R:1420% +;x 0 %R:1421% +;x 1 %R:1422% +;x 2 %R:1423% "ColorScheme"=dword:00000000 [HKEY_CURRENT_USER\Software\ExplorerPatcher\sws] -;c 20 Row height +;c 20 %R:1424% ;x 330 330 pt ;x 320 320 pt ;x 310 310 pt @@ -309,7 +305,7 @@ ;x 260 260 pt ;x 250 250 pt ;x 240 240 pt -;x 230 230 pt (default) +;x 230 %R:1429% ;x 220 220 pt ;x 210 210 pt ;x 200 200 pt @@ -320,126 +316,127 @@ ;x 150 150 pt ;x 140 140 pt "RowHeight"=dword:000000e6 -;c 10 Maximum width (percentage of screen width) -;x 100 100 % (not recommended) +;c 10 %R:1430% +;x 100 %R:1431% ;x 95 95 % ;x 90 90 % ;x 85 85 % -;x 80 80 % (default) +;x 80 %R:1432% ;x 75 75 % ;x 70 70 % ;x 65 65 % ;x 60 60 % ;x 55 55 % "MaxWidth"=dword:00000050 -;c 10 Maximum height (percentage of screen height) -;x 100 100 % (not recommended) +;c 10 %R:1433% +;x 100 %R:1434% ;x 95 95 % ;x 90 90 % ;x 85 85 % -;x 80 80 % (default) +;x 80 %R:1435% ;x 75 75 % ;x 70 70 % ;x 65 65 % ;x 60 60 % ;x 55 55 % "MaxHeight"=dword:00000050 -;c 11 Window padding +;c 11 %R:1436% ;x 50 50 pt ;x 45 45 pt -;x 40 40 pt (default) +;x 40 40 pt ;x 35 30 pt ;x 30 30 pt ;x 25 25 pt -;x 20 20 pt +;x 20 %R:1437% ;x 15 15 pt ;x 10 10 pt ;x 5 5 pt -;x 0 None -"MasterPadding"=dword:00000028 -;c 11 Show delay -;x 0 None -;x 25 25 ms -;x 50 50 ms -;x 75 75 ms -;x 100 100 ms (default) -;x 125 125 ms -;x 150 150 ms -;x 200 200 ms -;x 300 300 ms -;x 400 400 ms -;x 500 500 ms +;x 0 %R:1438% +"MasterPadding"=dword:00000014 +;c 11 %R:1439% +;x 0 %R:1440% +;x 25 %R:1441% +;x 50 %R:1442% +;x 75 %R:1443% +;x 100 %R:1444% +;x 125 %R:1445% +;x 150 %R:1446% +;x 200 %R:1447% +;x 300 %R:1448% +;x 400 %R:1449% +;x 500 %R:1450% "ShowDelay"=dword:00000064 -;c 3 Use the scroll wheel to change selection -;x 0 Never (default) -;x 1 When cursor is over the switcher -;x 2 Always +;c 3 %R:1451% +;x 0 %R:1452% +;x 1 %R:1453% +;x 2 %R:1454% "ScrollWheelBehavior"=dword:00000000 ;q -;y Learn more about Simple Window Switcher 🡕 +;y %R:1455% 🡕 ;https://github.com/valinet/ExplorerPatcher/wiki/Simple-Window-Switcher -;t Some settings might not be available in older Windows 10 versions. +;g WindowSwitcher_SWS -;T Weather +;T %R:1501% [HKEY_CURRENT_USER\Software\ExplorerPatcher] -;b Show Weather on the taskbar +;b %R:1502% ;"Virtualized_{D17F1E1A-5919-4427-8F89-A1A8503CA3EB}_PeopleBand"=dword:00000000 -;c 5 Layout -;x 0 Icon and description (default) -;x 3 Icon and temperature -;x 1 Icon only -;x 4 Temperature only -;x 5 Temperature and description +;s Weather_Section1 IsWeatherEnabled +;w %R:1503% +;%R:1504% +;%R:1505% +"WeatherLocation"="" +;c 5 %R:1506% +;x 0 %R:1507% +;x 3 %R:1508% +;x 1 %R:1509% +;x 4 %R:1510% +;x 5 %R:1511% "WeatherViewMode"=dword:00000000 -;c 3 Widget size -;x 0 Automatic (fit contents) (default) -;x 2 Automatic (fit contents) with threshold -;x 1 Fixed +;c 3 %R:1512% +;x 0 %R:1513% +;x 2 %R:1514% +;x 1 %R:1515% "WeatherFixedSize"=dword:00000000 -;c 2 Widget position -;x 0 Right / bottom (default) -;x 1 Left / top +;c 2 %R:1516% +;x 0 %R:1517% +;x 1 %R:1518% "WeatherToLeft"=dword:00000000 -;c 7 Update frequency -;x 60 Every minute -;x 300 Every 5 minutes -;x 900 Every 15 minutes -;x 1200 Every 20 minutes (default) -;x 1800 Every half an hour -;x 3600 Every hour -;x 7200 Every couple of hours +;c 7 %R:1519% +;x 60 %R:1520% +;x 300 %R:1521% +;x 900 %R:1522% +;x 1200 %R:1523% +;x 1800 %R:1524% +;x 3600 %R:1525% +;x 7200 %R:1526% "WeatherContentUpdateMode"=dword:000004B0 -;c 2 Temperature unit -;x 0 Celsius (default) -;x 1 Fahrenheit +;c 2 %R:1527% +;x 0 %R:1528% +;x 1 %R:1529% "WeatherTemperatureUnit"=dword:00000000 -;w Location -;Search City or Zip Code; the program looks up "weather in /* what you typed */" on Google. Leave blank for the default value (current location). -;Current location (default) -"WeatherLocation"="" ;;;c 2 Location accuracy ;;;x 0 Generic (based on the IP address) (default) ;;;x 1 Precise (geolocation) ;;"WeatherLocationType"=dword:00000000 -;w Language -;Type the short code for the language you'd like the weather data to be displayed in. For example, try "en", "ro", "de", "fr" etc. Leave blank for the default value (language of the Windows OS). -;System language (default) +;w %R:1533% +;%R:1534% +;%R:1535% "WeatherLanguage"="" -;c 3 Color scheme -;x 0 Follow system setting (default) -;x 1 Light -;x 2 Dark +;c 3 %R:1536% +;x 0 %R:1537% +;x 1 %R:1538% +;x 2 %R:1539% "WeatherTheme"=dword:00000000 -;c 2 Icon pack -;x 0 Microsoft (default) -;x 1 Google +;c 2 %R:1544% +;x 0 %R:1545% +;x 1 %R:1546% "WeatherIconPack"=dword:00000000 -;c 2 Display widget contents -;x 0 On a single line (default) -;x 1 On 2 lines, if possible +;c 2 %R:1547% +;x 0 %R:1548% +;x 1 %R:1549% "WeatherContentsMode"=dword:00000000 -;c 17 Zoom +;c 17 %R:1550% ;x 25 25 % ;x 33 33 % ;x 50 50 % @@ -447,7 +444,7 @@ ;x 75 75 % ;x 80 80 % ;x 90 90 % -;x 0 100 % (default) +;x 0 %R:1551% ;x 110 110 % ;x 125 125 % ;x 150 150 % @@ -459,151 +456,148 @@ ;x 500 500 % "WeatherZoomFactor"=dword:00000000 ;q -;y Learn more about the Weather taskbar widget 🡕 +;g Weather_Section1 +;y %R:1552% 🡕 ;https://github.com/valinet/ExplorerPatcher/wiki/Weather +;s Weather_Section2 IsWeatherEnabled ;t %WEATHERLASTUPDATETEXT% -;u Update weather now +;u %R:1554% ;update_weather -;u Clear weather widget local data +;u %R:1555% ;clear_data_weather +;g Weather_Section2 -;T Other +;T %R:1701% [HKEY_CURRENT_USER\Software\ExplorerPatcher] -;b Remember last used section in this window +;b %R:1702% "LastSectionInProperties"=dword:00000000 -;b Open clock flyout when pressing Win+C instead of Microsoft Teams * +;b %R:1703% * "ClockFlyoutOnWinC"=dword:00000000 -;b Show separators between taskbar toolbars * +;b %R:1704% * "ToolbarSeparators"=dword:00000000 [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced] -;b Show Command Prompt instead of PowerShell in Win+X menu * +;b %R:1706% * "DontUsePowerShellOnWinX"=dword:00000000 [HKEY_CURRENT_USER\Software\ExplorerPatcher] -;b Remove shortcut key from program settings item in Win+X menu +;b %R:1707% "NoMenuAccelerator"=dword:00000000 -;b Disable Office hotkeys (Ctrl+Alt+Shift+Windows key combinations) * +;b %R:1708% * "DisableOfficeHotkeys"=dword:00000000 -;b Disable Win+F (Feedback Hub) hotkey * +;b %R:1709% * "DisableWinFHotkey"=dword:00000000 [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced] -;c 6 Default action in the Alt+F4 dialog on the desktop -;x 256 Switch user -;x 1 Sign out -;x 16 Sleep -;x 64 Hibernate -;x 2 Shut down (default) -;x 4 Restart +;c 6 %R:1715% +;x 256 %R:1716% +;x 1 %R:1717% +;x 16 %R:1718% +;x 64 %R:1719% +;x 2 %R:1720% +;x 4 %R:1721% "Start_PowerButtonAction"=dword:00000002 -;t Prevent the following Control Panel links from being redirected to the Settings app: +;t %R:1722% [HKEY_CURRENT_USER\Software\ExplorerPatcher] -;b System / About page +;b %R:1723% "DoNotRedirectSystemToSettingsApp"=dword:00000000 -;b Programs and Features +;b %R:1724% "DoNotRedirectProgramsAndFeaturesToSettingsApp"=dword:00000000 -;b Adjust date/time +;b %R:1725% "DoNotRedirectDateAndTimeToSettingsApp"=dword:00000000 -;b Customize notification icons +;b %R:1726% "DoNotRedirectNotificationIconsToSettingsApp"=dword:00000000 -;T Updates +;T %R:1801% [HKEY_CURRENT_USER\Software\ExplorerPatcher] -;z 3 When File Explorer starts -;x 1 Notify about available updates (default) -;x 0 Prompt to install available updates -;x 2 Do not check for updates +;z 3 %R:1802% +;x 1 %R:1803% +;x 0 %R:1804% +;x 2 %R:1805% "UpdatePolicy"=dword:00000001 -;b Receive pre-release versions, if available (not recommended) +;b %R:1806% "UpdatePreferStaging"=dword:00000000 -;b Suggest the latest version on the server, even if it's older (not recommended) +;b %R:1807% "UpdateAllowDowngrades"=dword:00000000 -;t Update servers: -;w Releases -;Type a URL that serves resources adhering to GitHub's releases API. To learn how to configure your own update server, please consult the wiki. +;t %R:1808% +;w %R:1809% +;%R:1810% ;github.com/valinet/ExplorerPatcher/releases/latest "UpdateURL"="" -;w Pre-releases -;Type a URL that serves resources adhering to GitHub's pre-releases API. To learn how to configure your own update server, please consult the wiki. +;w %R:1811% +;%R:1812% ;api.github.com/repos/valinet/ExplorerPatcher/releases?per_page=1 "UpdateURLStaging"="" -;y Check for updates +;y %R:1813% ;;;EP_CHECK_FOR_UPDATES -;y Update program and restart File Explorer +;y %R:1814% ;;;EP_INSTALL_UPDATES -;y Read about changes in the latest releases 🡕 +;y %R:1815% 🡕 ;https://github.com/valinet/ExplorerPatcher/blob/master/CHANGELOG.md -;y Learn more 🡕 +;y %R:1816% 🡕 ;https://github.com/valinet/ExplorerPatcher/wiki/Configure-updates -;T Advanced -;e Only change these settings after reading the documentation about them. -;y Learn more 🡕 +;T %R:1901% +;e %R:1902% +;y %R:1903% 🡕 ;https://github.com/valinet/ExplorerPatcher/wiki/About-advanced-settings ;q [HKEY_CURRENT_USER\Software\ExplorerPatcher] -;b Enable console +;b %R:1904% "AllocConsole"=dword:00000000 -;b Dump memory leaks +;b %R:1905% "Memcheck"=dword:00000000 -;b Double click taskbar to toggle auto-hide (only works when the taskbar is locked) +;b %R:1906% "TaskbarAutohideOnDoubleClick"=dword:00000000 [HKEY_CURRENT_USER\Control Panel\Desktop] -;b Show Windows build info on the desktop * +;b %R:1907% * "PaintDesktopVersion"=dword:00000000 [HKEY_CURRENT_USER\Software\ExplorerPatcher] -;b Enable advanced mitigations for correct rendering using classic theme * +;b %R:1908% * "ClassicThemeMitigations"=dword:00000000 [-HKEY_CURRENT_USER\Software\Classes\CLSID\{1eeb5b5a-06fb-4732-96b3-975c0194eb39}\InprocServer32] -;d Enable SysListView32 for Explorer views * +;d %R:1909% * @="" [HKEY_CURRENT_USER\Software\ExplorerPatcher] -;b Do not change the taskbar context menu (e.g. do not display the "Properties" item) +;b %R:1910% "NoPropertiesInContextMenu"=dword:00000000 -;b Enable symbols download * +;b %R:1911% * "EnableSymbolDownload"=dword:00000001 -;b Pinned items act as quick launch (don't group pinned items with active apps) * +;b %R:1912% * "PinnedItemsActAsQuickLaunch"=dword:00000000 -;b When the taskbar shows button labels, remove the extra gap around pinned items * +;b %R:1913% * "RemoveExtraGapAroundPinnedItems"=dword:00000000 -;T About -;e ExplorerPatcher -;e Version %VERSIONINFORMATIONSTRING% +;T %R:2001% +;e %R:201% +;e %VERSIONINFORMATIONSTRING% ;t © 2006-2023 VALINET Solutions SRL. All rights reserved. -;e -;e This project aims to enhance the working environment on Windows. -;e Proudly engineered by Valentin-Gabriel Radu. -;t Running on Windows 10, OS Build %OSVERSIONSTRING% -;y Visit project GitHub (https://github.com/valinet) 🡕 +;e +;e %R:2003% +;e %R:2004% +;t %OSVERSIONSTRING% +;y %R:2006% (https://github.com/valinet) 🡕 ;https://github.com/valinet ;q -;y Visit web site (https://www.valinet.ro) 🡕 +;y %R:2007% (https://www.valinet.ro) 🡕 ;https://www.valinet.ro -;y E-mail author (valentingabrielradu@gmail.com) 🡕 -;mailto:valentingabrielradu@gmail.com -;y Donate (using PayPal) 🡕 +;y %R:2009% 🡕 ;https://www.paypal.com/donate?business=valentingabrielradu%40gmail.com&no_recurring=0&item_name=ExplorerPatcher¤cy_code=EUR -;y Frequently Asked Questions 🡕 +;y %R:2010% 🡕 ;https://github.com/valinet/ExplorerPatcher/wiki/Frequently-asked-questions -;y Learn more managing these settings 🡕 +;y %R:2011% 🡕 ;https://github.com/valinet/ExplorerPatcher/wiki/Settings-management -;u Import settings +;u %R:2012% ;import -;u Export current settings +;u %R:2013% ;export -;u Restore default settings +;u %R:2014% ;reset ;f -;u Restart File Explorer (*) +;u %R:2101% (*) ;restart -;;u Restore default settings -;;reset -;;u About ExplorerPatcher -;;about \ No newline at end of file diff --git a/ep_setup/ep_setup.c b/ep_setup/ep_setup.c index 7706463c0..947e80b5e 100644 --- a/ep_setup/ep_setup.c +++ b/ep_setup/ep_setup.c @@ -875,6 +875,12 @@ int WINAPI wWinMain( bOk = InstallResource(bInstall, hInstance, IDR_EP_AMD64, wszPath); } if (bOk) + { + PathRemoveFileSpecW(wszPath); + wcscat_s(wszPath, MAX_PATH, L"\\ep_gui.dll"); + bOk = InstallResource(bInstall, hInstance, IDR_EP_GUI, wszPath); + } + if (bOk) { PathRemoveFileSpecW(wszPath); wcscat_s(wszPath, MAX_PATH, L"\\ep_dwm.exe"); @@ -1031,7 +1037,7 @@ int WINAPI wWinMain( dwLen = wcslen(wszPath); pArgs = wszPath + dwLen - 2; SHGetFolderPathW(NULL, SPECIAL_FOLDER, NULL, SHGFP_TYPE_CURRENT, wszPath + dwLen); - wcscat_s(wszPath, MAX_PATH, _T(APP_RELATIVE_PATH) L"\\" _T(PRODUCT_NAME) L".amd64.dll\",ZZGUI"); + wcscat_s(wszPath, MAX_PATH, _T(APP_RELATIVE_PATH) L"\\ep_gui.dll\",ZZGUI"); pArgs[0] = 0; bOk = SetupShortcut(bInstall, wszPath, pArgs + 1); ZeroMemory(wszPath, MAX_PATH); diff --git a/ep_setup/ep_setup.rc b/ep_setup/ep_setup.rc index 2324f7a5a..2bd0f049e 100644 --- a/ep_setup/ep_setup.rc +++ b/ep_setup/ep_setup.rc @@ -104,6 +104,8 @@ IDR_MS_WEBVIEW2_LOADER RCDATA "..\\build\\Release\\WebView2Loader.d IDR_EP_STARTMENU RCDATA "..\\build\\Release\\ep_startmenu.dll" +IDR_EP_GUI RCDATA "..\\build\\Release\\ep_gui.dll" + #endif // English (United States) resources ///////////////////////////////////////////////////////////////////////////// diff --git a/ep_setup/ep_setup_debug.rc b/ep_setup/ep_setup_debug.rc index 871f5d86e..0a1b811b8 100644 --- a/ep_setup/ep_setup_debug.rc +++ b/ep_setup/ep_setup_debug.rc @@ -104,6 +104,8 @@ IDR_MS_WEBVIEW2_LOADER RCDATA "..\\build\\Debug\\WebView2Loader.dll IDR_EP_STARTMENU RCDATA "..\\build\\Debug\\ep_startmenu.dll" +IDR_EP_GUI RCDATA "..\\build\\Debug\\ep_gui.dll" + #endif // English (United States) resources ///////////////////////////////////////////////////////////////////////////// diff --git a/ep_setup/resource.h b/ep_setup/resource.h index 00851ac59..75fe28b2a 100644 --- a/ep_setup/resource.h +++ b/ep_setup/resource.h @@ -9,6 +9,7 @@ #define IDR_EP_WEATHER_STUB 107 #define IDR_MS_WEBVIEW2_LOADER 201 #define IDR_EP_STARTMENU 108 +#define IDR_EP_GUI 109 // Next default values for new objects From a74f27b42d015e160fe46a28e534c10210ef08b0 Mon Sep 17 00:00:00 2001 From: Amrsatrio Date: Wed, 8 Nov 2023 02:23:43 +0700 Subject: [PATCH 03/12] GUI: Change PlatformToolset to v142 to align with others --- ep_gui/ep_gui.vcxproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ep_gui/ep_gui.vcxproj b/ep_gui/ep_gui.vcxproj index bcff4f17c..67482d0a6 100644 --- a/ep_gui/ep_gui.vcxproj +++ b/ep_gui/ep_gui.vcxproj @@ -22,13 +22,13 @@ DynamicLibrary true - v143 + v142 Unicode DynamicLibrary false - v143 + v142 true Unicode From b5b0b214439b4afd61f11a831daf53d7a37c678a Mon Sep 17 00:00:00 2001 From: Amrsatrio Date: Sun, 12 Nov 2023 04:11:41 +0700 Subject: [PATCH 04/12] L10N: Localized Updates and Symbols notifications --- ExplorerPatcher/dllmain.c | 8 +- ExplorerPatcher/symbols.c | 234 +++++++++++---------- ExplorerPatcher/symbols.h | 1 + ExplorerPatcher/updates.c | 211 ++++++++++--------- ExplorerPatcher/updates.h | 1 + ExplorerPatcher/utility.c | 2 + ExplorerPatcher/utility.h | 11 + ep_gui/ep_gui.vcxproj | 4 +- ep_gui/resources/EPCrashMessageResources.h | 9 - ep_gui/resources/EPSharedResources.h | 36 ++++ ep_gui/resources/ep_gui.rc | 4 +- ep_gui/resources/lang/ep_gui.en-US.rc | 23 ++ ep_gui/resources/resource.h | 4 +- 13 files changed, 317 insertions(+), 231 deletions(-) delete mode 100644 ep_gui/resources/EPCrashMessageResources.h create mode 100644 ep_gui/resources/EPSharedResources.h diff --git a/ExplorerPatcher/dllmain.c b/ExplorerPatcher/dllmain.c index 3c7714172..8cdc34126 100644 --- a/ExplorerPatcher/dllmain.c +++ b/ExplorerPatcher/dllmain.c @@ -51,7 +51,6 @@ RTL_OSVERSIONINFOW global_rovi; DWORD32 global_ubr; #endif #include -#include "../ep_gui/resources/EPCrashMessageResources.h" #define WINX_ADJUST_X 5 #define WINX_ADJUST_Y 5 @@ -200,6 +199,7 @@ BOOL g_bIsDesktopRaised = FALSE; #include "utility.h" #include "resource.h" +#include "../ep_gui/resources/EPSharedResources.h" #ifdef USE_PRIVATE_INTERFACES #include "ep_private.h" #endif @@ -11183,11 +11183,7 @@ DWORD InformUserAboutCrash(LPVOID unused) CrashCounterSettings cfg; GetCrashCounterSettings(&cfg); - wchar_t epGuiPath[MAX_PATH]; - ZeroMemory(epGuiPath, sizeof(epGuiPath)); - SHGetFolderPathW(NULL, SPECIAL_FOLDER, NULL, SHGFP_TYPE_CURRENT, epGuiPath); - wcscat_s(epGuiPath, MAX_PATH, _T(APP_RELATIVE_PATH) L"\\ep_gui.dll"); - HMODULE hEPGui = LoadLibraryExW(epGuiPath, NULL, LOAD_LIBRARY_AS_DATAFILE); + HMODULE hEPGui = LoadGuiModule(); if (!hEPGui) { return 0; // Can't load the strings, nothing to display diff --git a/ExplorerPatcher/symbols.c b/ExplorerPatcher/symbols.c index ca47cf07f..570a7b102 100644 --- a/ExplorerPatcher/symbols.c +++ b/ExplorerPatcher/symbols.c @@ -22,44 +22,18 @@ const char* startui_SN[STARTUI_SB_CNT] = { STARTUI_SB_0 }; -const wchar_t DownloadSymbolsXML[] = -L"\r\n" -L" \r\n" -L" \r\n" -L" \r\n" -L" \r\n" -L" \r\n" -L" \r\n" -L" \r\n" -L" \r\n"; - -const wchar_t DownloadOKXML[] = -L"\r\n" -L" \r\n" -L" \r\n" -L" \r\n" -L" \r\n" -L" \r\n" -L" \r\n" -L" \r\n" -L" \r\n"; - -const wchar_t InstallOK[] = -L"\r\n" -L" \r\n" -L" \r\n" -L" \r\n" -L" \r\n" -L" \r\n" -L" \r\n" -L" \r\n" -L" \r\n"; +const wchar_t DownloadNotificationXML[] = + L"\r\n" + L" \r\n" + L" \r\n" + L" \r\n" + L" \r\n" + L" \r\n" + L" \r\n" + L" \r\n" + L" \r\n"; extern INT VnDownloadSymbols(HMODULE hModule, char* dllName, char* szLibPath, UINT sizeLibPath); extern INT VnGetSymbols(const char* pdb_file, DWORD* addresses, char** symbols, DWORD numOfSymbols); @@ -349,15 +323,14 @@ DWORD DownloadSymbols(DownloadSymbolsParams* params) printf("[Symbols] Started \"Download symbols\" thread.\n"); + HMODULE hEPGui = LoadGuiModule(); + RTL_OSVERSIONINFOW rovi; DWORD32 ubr = VnGetOSVersionAndUBR(&rovi); - TCHAR szReportedVersion[MAX_PATH + 1]; - ZeroMemory( - szReportedVersion, - sizeof(szReportedVersion) - ); - wsprintf( + wchar_t szReportedVersion[32]; + swprintf_s( szReportedVersion, + ARRAYSIZE(szReportedVersion), L"%d.%d.%d.%d", rovi.dwMajorVersion, rovi.dwMinorVersion, @@ -365,18 +338,50 @@ DWORD DownloadSymbols(DownloadSymbolsParams* params) ubr ); - TCHAR buffer[1000]; - ZeroMemory( - buffer, - 1000 + wchar_t title[100]; + wchar_t body[200]; + wchar_t titleFormat[100]; + wchar_t buffer[1000]; + title[0] = 0; body[0] = 0; titleFormat[0] = 0; buffer[0] = 0; + + // Don't annoy the user with "Downloading symbols" notification if the symbols aren't available in MS' servers + HKEY hKey = NULL; + DWORD dwDisposition; + RegCreateKeyExW( + HKEY_CURRENT_USER, + TEXT(REGPATH), + 0, + NULL, + REG_OPTION_NON_VOLATILE, + KEY_READ, + NULL, + &hKey, + &dwDisposition ); - wsprintf( - buffer, - DownloadSymbolsXML, - szReportedVersion + wchar_t szLastNotifiedBuild[32]; + szLastNotifiedBuild[0] = 0; + DWORD dwSize = sizeof(szLastNotifiedBuild); + RegQueryValueExW( + hKey, + TEXT("SymbolsLastNotifiedOSBuild"), + 0, + NULL, + szLastNotifiedBuild, + &dwSize ); - if (params->bVerbose) + + BOOL bNewBuild = wcscmp(szLastNotifiedBuild, szReportedVersion) != 0; + if (bNewBuild) { + if (LoadStringW(hEPGui, IDS_SYM_DL_T, titleFormat, ARRAYSIZE(titleFormat))) + { + swprintf_s(title, ARRAYSIZE(title), titleFormat, szReportedVersion); + } + + LoadStringW(hEPGui, IDS_SYM_DL_B, body, ARRAYSIZE(body)); + + swprintf_s(buffer, ARRAYSIZE(buffer), DownloadNotificationXML, L"https://github.com/valinet/ExplorerPatcher/wiki/Symbols", L"short", title, body); + HRESULT hr = S_OK; __x_ABI_CWindows_CData_CXml_CDom_CIXmlDocument* inputXml = NULL; hr = String2IXMLDocument( @@ -392,14 +397,26 @@ DWORD DownloadSymbols(DownloadSymbolsParams* params) hr = ShowToastMessage( inputXml, APPID, - sizeof(APPID) / sizeof(TCHAR) - 1, + sizeof(APPID) / sizeof(wchar_t) - 1, #ifdef DEBUG stdout #else NULL #endif ); + + RegSetValueExW( + hKey, + TEXT("SymbolsLastNotifiedOSBuild"), + 0, + REG_SZ, + szReportedVersion, + wcslen(szReportedVersion) * sizeof(wchar_t) + ); } + + RegCloseKey(hKey); + wprintf( L"[Symbols] " L"Attempting to download symbols for OS version %s.\n", @@ -433,81 +450,86 @@ DWORD DownloadSymbols(DownloadSymbolsParams* params) symbols_addr symbols_PTRS; ZeroMemory(&symbols_PTRS, sizeof(symbols_addr)); - BOOL bDownloaded = FALSE; + BOOL bAnySuccess = FALSE, bAllSuccess = TRUE; if (params->loadResult.bNeedToDownloadTwinuiPcshellSymbols) { - bDownloaded |= ProcessTwinuiPcshellSymbols(szSettingsPath, symbols_PTRS.twinui_pcshell_PTRS); + BOOL bSuccess = ProcessTwinuiPcshellSymbols(szSettingsPath, symbols_PTRS.twinui_pcshell_PTRS); + bAnySuccess |= bSuccess; + bAllSuccess &= bSuccess; } if (params->loadResult.bNeedToDownloadStartDockedSymbols && IsWindows11()) { - bDownloaded |= ProcessStartDockedSymbols(szSettingsPath, symbols_PTRS.startdocked_PTRS); + BOOL bSuccess = ProcessStartDockedSymbols(szSettingsPath, symbols_PTRS.startdocked_PTRS); + bAnySuccess |= bSuccess; + bAllSuccess &= bSuccess; } if (params->loadResult.bNeedToDownloadStartUISymbols && rovi.dwBuildNumber >= 18362) { - bDownloaded |= ProcessStartUISymbols(szSettingsPath, symbols_PTRS.startui_PTRS); + BOOL bSuccess = ProcessStartUISymbols(szSettingsPath, symbols_PTRS.startui_PTRS); + bAnySuccess |= bSuccess; + bAllSuccess &= bSuccess; } printf("[Symbols] Finished gathering symbol data.\n"); - if (bDownloaded) + title[0] = 0; body[0] = 0; + BOOL bNotify = TRUE; + if (bAllSuccess) { - if (params->bVerbose) + if (LoadStringW(hEPGui, IDS_SYM_SUCCESS_T, titleFormat, ARRAYSIZE(titleFormat))) { - __x_ABI_CWindows_CData_CXml_CDom_CIXmlDocument* inputXml = NULL; - HRESULT hr = String2IXMLDocument( - InstallOK, - wcslen(InstallOK), - &inputXml, -#ifdef DEBUG - stdout -#else - NULL -#endif - ); - hr = ShowToastMessage( - inputXml, - APPID, - sizeof(APPID) / sizeof(TCHAR) - 1, -#ifdef DEBUG - stdout -#else - NULL -#endif - ); - Sleep(4000); - exit(0); + swprintf_s(title, ARRAYSIZE(title), titleFormat, szReportedVersion); } - else + LoadStringW(hEPGui, IDS_SYM_SUCCESS_B, body, ARRAYSIZE(body)); + swprintf_s(buffer, ARRAYSIZE(buffer), DownloadNotificationXML, L"https://github.com/valinet/ExplorerPatcher/wiki/Symbols", L"long", title, body); + } + else if (bAnySuccess) + { + if (LoadStringW(hEPGui, IDS_SYM_FAILEDSOME_T, titleFormat, ARRAYSIZE(titleFormat))) { - wsprintf( - buffer, - DownloadOKXML, - szReportedVersion - ); - __x_ABI_CWindows_CData_CXml_CDom_CIXmlDocument* inputXml2 = NULL; - HRESULT hr = String2IXMLDocument( - buffer, - wcslen(buffer), - &inputXml2, + swprintf_s(title, ARRAYSIZE(title), titleFormat, szReportedVersion); + } + LoadStringW(hEPGui, IDS_SYM_FAILEDSOME_B, body, ARRAYSIZE(body)); + swprintf_s(buffer, ARRAYSIZE(buffer), DownloadNotificationXML, L"https://github.com/valinet/ExplorerPatcher/wiki/Symbols", L"short", title, body); + } + else + { + if (LoadStringW(hEPGui, IDS_SYM_FAILEDALL_T, titleFormat, ARRAYSIZE(titleFormat))) + { + swprintf_s(title, ARRAYSIZE(title), titleFormat, szReportedVersion); + } + LoadStringW(hEPGui, IDS_SYM_FAILEDALL_B, body, ARRAYSIZE(body)); + swprintf_s(buffer, ARRAYSIZE(buffer), DownloadNotificationXML, L"https://github.com/valinet/ExplorerPatcher/wiki/Symbols", L"short", title, body); + bNotify = bNewBuild; + } + + if (bNotify) + { + __x_ABI_CWindows_CData_CXml_CDom_CIXmlDocument* inputXml2 = NULL; + HRESULT hr = String2IXMLDocument( + buffer, + wcslen(buffer), + &inputXml2, #ifdef DEBUG - stdout + stdout #else - NULL + NULL #endif - ); - hr = ShowToastMessage( - inputXml2, - APPID, - sizeof(APPID) / sizeof(TCHAR) - 1, + ); + hr = ShowToastMessage( + inputXml2, + APPID, + sizeof(APPID) / sizeof(wchar_t) - 1, #ifdef DEBUG - stdout + stdout #else - NULL + NULL #endif - ); - } + ); } + FreeLibrary(hEPGui); + printf("[Symbols] Finished \"Download symbols\" thread.\n"); return 0; } @@ -528,7 +550,7 @@ LoadSymbolsResult LoadSymbols(symbols_addr* symbols_PTRS) CHAR szStoredHash[33]; ZeroMemory(szHash, sizeof(szHash)); ZeroMemory(szStoredHash, sizeof(szStoredHash)); - TCHAR wszPath[MAX_PATH]; + wchar_t wszPath[MAX_PATH]; BOOL bOffsetsValid; // Load twinui.pcshell.dll offsets diff --git a/ExplorerPatcher/symbols.h b/ExplorerPatcher/symbols.h index 9f2326f36..0742365a6 100644 --- a/ExplorerPatcher/symbols.h +++ b/ExplorerPatcher/symbols.h @@ -6,6 +6,7 @@ #include #include #include "utility.h" +#include "../ep_gui/resources/EPSharedResources.h" #define EXIT_CODE_EXPLORER 1 diff --git a/ExplorerPatcher/updates.c b/ExplorerPatcher/updates.c index 50574dd77..c6c0bdcbd 100644 --- a/ExplorerPatcher/updates.c +++ b/ExplorerPatcher/updates.c @@ -862,6 +862,8 @@ BOOL ShowUpdateSuccessNotification( __x_ABI_CWindows_CUI_CNotifications_CIToastNotification** toast ) { + HMODULE hEPGui = LoadGuiModule(); + wchar_t buf[TOAST_BUFSIZ]; DWORD dwLeftMost = 0; DWORD dwSecondLeft = 0; @@ -869,20 +871,32 @@ BOOL ShowUpdateSuccessNotification( DWORD dwRightMost = 0; QueryVersionInfo(hModule, VS_VERSION_INFO, &dwLeftMost, &dwSecondLeft, &dwSecondRight, &dwRightMost); - __x_ABI_CWindows_CData_CXml_CDom_CIXmlDocument* inputXml = NULL; const wchar_t text[] = - L"\r\n" + L"\r\n" L" \r\n" L" \r\n" - L" \r\n" - L" \r\n" + L" \r\n" + L" \r\n" L" \r\n" L" \r\n" L" \r\n" L" \r\n"; - swprintf_s(buf, TOAST_BUFSIZ, text, dwLeftMost, dwSecondLeft, dwSecondRight, dwRightMost); + wchar_t title[100]; + wchar_t body[200]; + title[0] = 0; body[0] = 0; + + LoadStringW(hEPGui, IDS_UPDATES_SUCCESS_T, title, ARRAYSIZE(title)); + + wchar_t bodyFormat[200]; + ZeroMemory(bodyFormat, sizeof(bodyFormat)); + if (LoadStringW(hEPGui, IDS_UPDATES_INSTALLEDVER, bodyFormat, ARRAYSIZE(bodyFormat))) + { + swprintf_s(body, ARRAYSIZE(body), bodyFormat, dwLeftMost, dwSecondLeft, dwSecondRight, dwRightMost); + } + + swprintf_s(buf, TOAST_BUFSIZ, text, _T(UPDATES_RELEASE_INFO_URL), L"short", title, body); + __x_ABI_CWindows_CData_CXml_CDom_CIXmlDocument* inputXml = NULL; String2IXMLDocument( buf, wcslen(buf), @@ -910,8 +924,13 @@ BOOL ShowUpdateSuccessNotification( { inputXml->lpVtbl->Release(inputXml); } - + if (hEPGui) + { + FreeLibrary(hEPGui); + } SwitchToThread(); + + return TRUE; } BOOL InstallUpdatesIfAvailable( @@ -924,6 +943,8 @@ BOOL InstallUpdatesIfAvailable( DWORD dwUpdatePolicy ) { + HMODULE hEPGui = LoadGuiModule(); + wchar_t wszInfoURL[MAX_PATH]; ZeroMemory(wszInfoURL, MAX_PATH * sizeof(wchar_t)); wcscat_s(wszInfoURL, MAX_PATH, _T(UPDATES_RELEASE_INFO_URL_STABLE)); @@ -958,52 +979,47 @@ BOOL InstallUpdatesIfAvailable( } } - __x_ABI_CWindows_CData_CXml_CDom_CIXmlDocument* inputXml = NULL; + const wchar_t text[] = + L"\r\n" + L" \r\n" + L" \r\n" + L" \r\n" + L" \r\n" + L" \r\n" + L" \r\n" + L" \r\n" + L" \r\n"; + wchar_t title[100]; + wchar_t body[200]; + title[0] = 0; body[0] = 0; + if (dwOperation == UPDATES_OP_INSTALL) { - const wchar_t text[] = - L"\r\n" - L" \r\n" - L" \r\n" - L" \r\n" - L" \r\n" - L" \r\n" - L" \r\n" - L" \r\n" - L" \r\n"; - swprintf_s(buf, TOAST_BUFSIZ, text, dwLeftMost, dwSecondLeft, dwSecondRight, dwRightMost); - String2IXMLDocument( - buf, - wcslen(buf), - &inputXml, - NULL - ); + LoadStringW(hEPGui, IDS_UPDATES_DOWNLOADING_T, title, ARRAYSIZE(title)); } else if (dwOperation == UPDATES_OP_CHECK) { - const wchar_t text[] = - L"\r\n" - L" \r\n" - L" \r\n" - L" \r\n" - L" \r\n" - L" \r\n" - L" \r\n" - L" \r\n" - L" \r\n"; - swprintf_s(buf, TOAST_BUFSIZ, text, dwLeftMost, dwSecondLeft, dwSecondRight, dwRightMost); - String2IXMLDocument( - buf, - wcslen(buf), - &inputXml, - NULL - ); + LoadStringW(hEPGui, IDS_UPDATES_CHECKING_T, title, ARRAYSIZE(title)); } + wchar_t bodyFormat[200]; + ZeroMemory(bodyFormat, sizeof(bodyFormat)); + if (LoadStringW(hEPGui, IDS_UPDATES_INSTALLEDVER, bodyFormat, ARRAYSIZE(bodyFormat))) + { + swprintf_s(body, ARRAYSIZE(body), bodyFormat, dwLeftMost, dwSecondLeft, dwSecondRight, dwRightMost); + } + + swprintf_s(buf, TOAST_BUFSIZ, text, _T(UPDATES_RELEASE_INFO_URL), L"long", title, body); + + __x_ABI_CWindows_CData_CXml_CDom_CIXmlDocument* inputXml = NULL; + String2IXMLDocument( + buf, + wcslen(buf), + &inputXml, + NULL + ); + if (dwOperation == UPDATES_OP_CHECK || dwOperation == UPDATES_OP_INSTALL) { if (*toast) @@ -1037,7 +1053,7 @@ BOOL InstallUpdatesIfAvailable( ZeroMemory(hash, 100 * sizeof(CHAR)); ComputeFileHash2(hModule, dllName, hash, 100); - BOOL bFail = FALSE; + BOOL bFail = FALSE, bReturnValue = FALSE; dwLeftMost = 0; dwSecondLeft = 0; dwSecondRight = 0; dwRightMost = 0; if (IsUpdateAvailable(_T(REGPATH), hash, &bFail, wszInfoURL, MAX_PATH, hModule, &dwLeftMost, &dwSecondLeft, &dwSecondRight, &dwRightMost)) { @@ -1050,18 +1066,12 @@ BOOL InstallUpdatesIfAvailable( { if (dwOperation == UPDATES_OP_INSTALL) { - const wchar_t text[] = - L"\r\n" - L" \r\n" - L" \r\n" - L" \r\n" - L" \r\n" - L" \r\n" - L" \r\n" - L" \r\n" - L" \r\n"; + title[0] = 0; body[0] = 0; + LoadStringW(hEPGui, IDS_UPDATES_DLFAILED_T, title, ARRAYSIZE(title)); + LoadStringW(hEPGui, IDS_UPDATES_DLFAILED_B, body, ARRAYSIZE(body)); + + swprintf_s(buf, TOAST_BUFSIZ, text, _T(UPDATES_RELEASE_INFO_URL), L"short", title, body); + String2IXMLDocument( text, wcslen(text), @@ -1097,28 +1107,25 @@ BOOL InstallUpdatesIfAvailable( } else if ((dwOperation == UPDATES_OP_DEFAULT && dwUpdatePolicy == UPDATE_POLICY_NOTIFY) || (dwOperation == UPDATES_OP_CHECK)) { - const wchar_t text[] = - L"\r\n" - L" \r\n" - L" \r\n" - L" \r\n" - L" \r\n" - L" \r\n" - L" \r\n" - L" \r\n" - L" \r\n"; + title[0] = 0; body[0] = 0; + if (!dwLeftMost) { - swprintf_s(buf, TOAST_BUFSIZ, text, wszInfoURL, L"New version"); + LoadStringW(hEPGui, IDS_UPDATES_AVAILABLE_T_U, title, ARRAYSIZE(title)); } else { - WCHAR wszVersionInfo[100]; - swprintf_s(wszVersionInfo, 100, L"Version %d.%d.%d.%d is", dwLeftMost, dwSecondLeft, dwSecondRight, dwRightMost); - swprintf_s(buf, TOAST_BUFSIZ, text, wszInfoURL, wszVersionInfo); + WCHAR titleFormat[100]; + if (LoadStringW(hEPGui, IDS_UPDATES_AVAILABLE_T, titleFormat, ARRAYSIZE(titleFormat))) + { + swprintf_s(title, ARRAYSIZE(title), titleFormat, dwLeftMost, dwSecondLeft, dwSecondRight, dwRightMost); + } } + + LoadStringW(hEPGui, IDS_UPDATES_AVAILABLE_B, body, ARRAYSIZE(body)); + + swprintf_s(buf, TOAST_BUFSIZ, text, wszInfoURL, L"long", title, body); + __x_ABI_CWindows_CData_CXml_CDom_CIXmlDocument* inputXml = NULL; String2IXMLDocument( buf, @@ -1148,8 +1155,7 @@ BOOL InstallUpdatesIfAvailable( inputXml->lpVtbl->Release(inputXml); } } - - return TRUE; + bReturnValue = TRUE; } else { @@ -1163,34 +1169,24 @@ BOOL InstallUpdatesIfAvailable( } if (dwOperation == UPDATES_OP_CHECK || dwOperation == UPDATES_OP_INSTALL) { - const wchar_t text[] = - L"\r\n" - L" \r\n" - L" \r\n" - L" \r\n" - L" \r\n" - L" \r\n" - L" \r\n" - L" \r\n" - L" \r\n"; - const wchar_t text2[] = - L"\r\n" - L" \r\n" - L" \r\n" - L" \r\n" - L" \r\n" - L" \r\n" - L" \r\n" - L" \r\n" - L" \r\n"; + title[0] = 0; body[0] = 0; + if (bFail) + { + LoadStringW(hEPGui, IDS_UPDATES_CHECKFAILED_T, title, ARRAYSIZE(title)); + LoadStringW(hEPGui, IDS_UPDATES_CHECKFAILED_B, body, ARRAYSIZE(body)); + } + else + { + LoadStringW(hEPGui, IDS_UPDATES_ISLATEST_T, title, ARRAYSIZE(title)); + LoadStringW(hEPGui, IDS_UPDATES_ISLATEST_B, body, ARRAYSIZE(body)); + } + + swprintf_s(buf, TOAST_BUFSIZ, text, _T(UPDATES_RELEASE_INFO_URL), L"short", title, body); + __x_ABI_CWindows_CData_CXml_CDom_CIXmlDocument* inputXml = NULL; String2IXMLDocument( - bFail ? text2 : text, - wcslen(bFail ? text2 : text), + buf, + wcslen(buf), &inputXml, NULL ); @@ -1216,6 +1212,13 @@ BOOL InstallUpdatesIfAvailable( inputXml->lpVtbl->Release(inputXml); } } - return FALSE; + bReturnValue = FALSE; } + + if (hEPGui) + { + FreeLibrary(hEPGui); + } + + return bReturnValue; } \ No newline at end of file diff --git a/ExplorerPatcher/updates.h b/ExplorerPatcher/updates.h index a2260791a..40509f937 100644 --- a/ExplorerPatcher/updates.h +++ b/ExplorerPatcher/updates.h @@ -6,6 +6,7 @@ #pragma comment(lib, "Wininet.lib") #include #include "utility.h" +#include "../ep_gui/resources/EPSharedResources.h" extern HMODULE hModule; diff --git a/ExplorerPatcher/utility.c b/ExplorerPatcher/utility.c index 10c14eb71..1f685604c 100644 --- a/ExplorerPatcher/utility.c +++ b/ExplorerPatcher/utility.c @@ -203,6 +203,7 @@ __declspec(dllexport) int CALLBACK ZZTestBalloon(HWND hWnd, HINSTANCE hInstance, return 0; } +#ifdef _DEBUG const wchar_t TestToastXML[] = L"\r\n" @@ -256,6 +257,7 @@ __declspec(dllexport) int CALLBACK ZZTestToast(HWND hWnd, HINSTANCE hInstance, L free(lpwszCmdLine); return 0; } +#endif __declspec(dllexport) int CALLBACK ZZLaunchExplorer(HWND hWnd, HINSTANCE hInstance, LPSTR lpszCmdLine, int nCmdShow) { diff --git a/ExplorerPatcher/utility.h b/ExplorerPatcher/utility.h index 3cf566397..9bb815356 100644 --- a/ExplorerPatcher/utility.h +++ b/ExplorerPatcher/utility.h @@ -254,7 +254,9 @@ LRESULT CALLBACK BalloonWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPara __declspec(dllexport) int CALLBACK ZZTestBalloon(HWND hWnd, HINSTANCE hInstance, LPSTR lpszCmdLine, int nCmdShow); +#ifdef _DEBUG __declspec(dllexport) int CALLBACK ZZTestToast(HWND hWnd, HINSTANCE hInstance, LPSTR lpszCmdLine, int nCmdShow); +#endif __declspec(dllexport) int CALLBACK ZZLaunchExplorer(HWND hWnd, HINSTANCE hInstance, LPSTR lpszCmdLine, int nCmdShow); @@ -818,6 +820,15 @@ inline PVOID FindPattern(PVOID pBase, SIZE_T dwSize, LPCSTR lpPattern, LPCSTR lp return NULL; } + +inline HMODULE LoadGuiModule() +{ + wchar_t epGuiPath[MAX_PATH]; + ZeroMemory(epGuiPath, sizeof(epGuiPath)); + SHGetFolderPathW(NULL, SPECIAL_FOLDER, NULL, SHGFP_TYPE_CURRENT, epGuiPath); + wcscat_s(epGuiPath, MAX_PATH, _T(APP_RELATIVE_PATH) L"\\ep_gui.dll"); + return LoadLibraryExW(epGuiPath, NULL, LOAD_LIBRARY_AS_DATAFILE); +} #endif #ifdef __cplusplus diff --git a/ep_gui/ep_gui.vcxproj b/ep_gui/ep_gui.vcxproj index 67482d0a6..04af69d1f 100644 --- a/ep_gui/ep_gui.vcxproj +++ b/ep_gui/ep_gui.vcxproj @@ -95,13 +95,13 @@ - + - + diff --git a/ep_gui/resources/EPCrashMessageResources.h b/ep_gui/resources/EPCrashMessageResources.h deleted file mode 100644 index 49dc246a2..000000000 --- a/ep_gui/resources/EPCrashMessageResources.h +++ /dev/null @@ -1,9 +0,0 @@ -#pragma once - -// 401-500 - -#define IDS_CRASH_TITLE 401 -#define IDS_CRASH_BODY 402 -#define IDS_CRASH_ONCE 403 -#define IDS_CRASH_MULTIPLE 404 -#define IDS_CRASH_DISMISS 405 diff --git a/ep_gui/resources/EPSharedResources.h b/ep_gui/resources/EPSharedResources.h new file mode 100644 index 000000000..7c229a3f1 --- /dev/null +++ b/ep_gui/resources/EPSharedResources.h @@ -0,0 +1,36 @@ +#pragma once + +// 301-350 + +#define IDS_UPDATES_CHECKING_T 301 +#define IDS_UPDATES_AVAILABLE_T 302 +#define IDS_UPDATES_AVAILABLE_T_U 303 +#define IDS_UPDATES_AVAILABLE_B 304 +#define IDS_UPDATES_ISLATEST_T 305 +#define IDS_UPDATES_ISLATEST_B 306 +#define IDS_UPDATES_CHECKFAILED_T 307 +#define IDS_UPDATES_CHECKFAILED_B 308 +#define IDS_UPDATES_DOWNLOADING_T 309 +#define IDS_UPDATES_SUCCESS_T 310 +#define IDS_UPDATES_DLFAILED_T 311 +#define IDS_UPDATES_DLFAILED_B 312 +#define IDS_UPDATES_INSTALLEDVER 313 + +// 351-400 + +#define IDS_SYM_DL_T 351 +#define IDS_SYM_DL_B 352 +#define IDS_SYM_SUCCESS_T 353 +#define IDS_SYM_SUCCESS_B 354 +#define IDS_SYM_FAILEDSOME_T 355 +#define IDS_SYM_FAILEDSOME_B 356 +#define IDS_SYM_FAILEDALL_T 357 +#define IDS_SYM_FAILEDALL_B 358 + +// 401-500 + +#define IDS_CRASH_TITLE 401 +#define IDS_CRASH_BODY 402 +#define IDS_CRASH_ONCE 403 +#define IDS_CRASH_MULTIPLE 404 +#define IDS_CRASH_DISMISS 405 diff --git a/ep_gui/resources/ep_gui.rc b/ep_gui/resources/ep_gui.rc index 9ea1170b2..244993047 100644 --- a/ep_gui/resources/ep_gui.rc +++ b/ep_gui/resources/ep_gui.rc @@ -71,9 +71,9 @@ BEGIN VALUE "CompanyName", "VALINET Solutions SRL" VALUE "FileDescription", "ExplorerPatcher Settings" VER_FILE_STRING - VALUE "InternalName", "ep_gui.exe" + VALUE "InternalName", "ep_gui.dll" VALUE "LegalCopyright", "Copyright (C) 2006-2023 VALINET Solutions SRL. All rights reserved." - VALUE "OriginalFilename", "ep_gui.exe" + VALUE "OriginalFilename", "ep_gui.dll" VALUE "ProductName", "ExplorerPatcher" VER_PRODUCT_STRING END diff --git a/ep_gui/resources/lang/ep_gui.en-US.rc b/ep_gui/resources/lang/ep_gui.en-US.rc index 7bd046813..d03293f26 100644 --- a/ep_gui/resources/lang/ep_gui.en-US.rc +++ b/ep_gui/resources/lang/ep_gui.en-US.rc @@ -5,6 +5,29 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US STRINGTABLE BEGIN + IDS_UPDATES_CHECKING_T "Checking for updates…" + IDS_UPDATES_AVAILABLE_T "Version %d.%d.%d.%d is available" + IDS_UPDATES_AVAILABLE_T_U "New version available" + IDS_UPDATES_AVAILABLE_B "You can update by right clicking the taskbar, choosing ""Properties"", then ""Updates"". Click here to learn more about this update." + IDS_UPDATES_ISLATEST_T "No updates are available" + IDS_UPDATES_ISLATEST_B "Please check back later." + IDS_UPDATES_CHECKFAILED_T "Unable to check for updates" + IDS_UPDATES_CHECKFAILED_B "Make sure that you are connected to the Internet and that the remote server is online." + IDS_UPDATES_DOWNLOADING_T "Downloading and installing updates…" + IDS_UPDATES_SUCCESS_T "Update successful" + IDS_UPDATES_DLFAILED_T "Update failed" + IDS_UPDATES_DLFAILED_B "The request was declined or an error has occured when attempting to install this update." + IDS_UPDATES_INSTALLEDVER "Installed version: %d.%d.%d.%d" + + IDS_SYM_DL_T "Downloading symbols for OS build %s, please wait…" + IDS_SYM_DL_B "This may take several minutes. For now, ExplorerPatcher may have limited and/or broken functionality. Click here to learn more about symbols." + IDS_SYM_SUCCESS_T "Successfully downloaded symbols for OS build %s" + IDS_SYM_SUCCESS_B "Please restart File Explorer to restore proper functionality." + IDS_SYM_FAILEDSOME_T "Downloaded some symbols for OS build %s" + IDS_SYM_FAILEDSOME_B "Some other symbols could not be downloaded. This may be due to the current OS build being too recent or the Internet connection being unstable." + IDS_SYM_FAILEDALL_T "Failed to download symbols for OS build %s" + IDS_SYM_FAILEDALL_B "No symbols could be downloaded for this build. This may be due to the current OS build being too recent or the Internet connection being unavailable or unstable." + IDS_CRASH_TITLE "Unfortunately, File Explorer is crashing :(" IDS_CRASH_BODY "It seems that File Explorer closed unexpectedly %1$s in less than %2$d seconds each time when starting up. This might indicate a problem caused by ExplorerPatcher, which might be unaware of recent changes in Windows, for example when running on a new OS build.\nHere are a few recommendations:\n• If an updated version is available, you can update ExplorerPatcher and restart File Explorer.\n• On GitHub, you can view releases, check the current status, discuss or review the latest issues.\n• If you suspect this is not caused by ExplorerPatcher, please uninstall any recently installed shell extensions or similar utilities.\n• If no fix is available for the time being, you can uninstall ExplorerPatcher, and then later reinstall it when a fix is published on GitHub. Rest assured, even if you uninstall, your program configuration will be preserved.\n\nI am sorry for the inconvenience this might cause; I am doing my best to try to keep this program updated and working.\n\nExplorerPatcher is disabled until the next File Explorer restart, in order to allow you to perform maintenance tasks and take the necessary actions." IDS_CRASH_ONCE "once" diff --git a/ep_gui/resources/resource.h b/ep_gui/resources/resource.h index e1b818e9e..7a40ccb11 100644 --- a/ep_gui/resources/resource.h +++ b/ep_gui/resources/resource.h @@ -6,8 +6,8 @@ #define IDR_REGISTRY2 102 #define IDS_PRODUCTNAME 201 -// 401-500 -#include "EPCrashMessageResources.h" +// 301-500 +#include "EPSharedResources.h" // 1001-2200 #include "EPSettingsResources.h" From fc1745596229e671aaf3cc3e3f94b145fdcd7752 Mon Sep 17 00:00:00 2001 From: Amrsatrio Date: Sun, 12 Nov 2023 06:05:54 +0700 Subject: [PATCH 05/12] L10N: Localized remaining user-facing texts in GUI and Updates --- ExplorerPatcher/updates.c | 19 ++++++++++++----- ep_gui/GUI.c | 29 +++++++++++++++----------- ep_gui/resources/EPSettingsResources.h | 7 ++++++- ep_gui/resources/EPSharedResources.h | 1 + ep_gui/resources/lang/ep_gui.en-US.rc | 6 ++++++ ep_gui/resources/settings.reg | 2 +- ep_gui/resources/settings10.reg | 2 +- 7 files changed, 46 insertions(+), 20 deletions(-) diff --git a/ExplorerPatcher/updates.c b/ExplorerPatcher/updates.c index c6c0bdcbd..e97a739a8 100644 --- a/ExplorerPatcher/updates.c +++ b/ExplorerPatcher/updates.c @@ -520,7 +520,7 @@ BOOL IsUpdateAvailableHelper( } CloseHandle(hMyToken); } - int lnSID = (wszSID ? wcslen(wszSID) : 0); + size_t lnSID = (wszSID ? wcslen(wszSID) : 0); DWORD bIsBuiltInAdministratorInApprovalMode = FALSE; BOOL bIsBuiltInAdministratorAccount = IsUserAnAdmin() && @@ -545,7 +545,16 @@ BOOL IsUpdateAvailableHelper( ); WCHAR wszMsg[500]; - swprintf_s(wszMsg, 500, L"Would you like to install an update for " _T(PRODUCT_NAME) L"?\n\nDownloaded from:\n%s", wszURL2); + wszMsg[0] = 0; + + WCHAR wszMsgFormat[500]; + HMODULE hEPGui = LoadGuiModule(); + if (LoadStringW(hEPGui, IDS_UPDATES_PROMPT, wszMsgFormat, ARRAYSIZE(wszMsgFormat))) + { + swprintf_s(wszMsg, ARRAYSIZE(wszMsg), wszMsgFormat, wszURL2); + } + FreeLibrary(hEPGui); + if (MessageBoxW( FindWindowW(L"ExplorerPatcher_GUI_" _T(EP_CLSID), NULL), wszMsg, @@ -576,7 +585,7 @@ BOOL IsUpdateAvailableHelper( { bIsUpdateAvailable = TRUE; #ifdef UPDATES_VERBOSE_OUTPUT - printf("[Updates] Update successful, File Explorer will probably restart momentarly.\n"); + printf("[Updates] Update successful, File Explorer will probably restart momentarily.\n"); #endif } else @@ -1073,8 +1082,8 @@ BOOL InstallUpdatesIfAvailable( swprintf_s(buf, TOAST_BUFSIZ, text, _T(UPDATES_RELEASE_INFO_URL), L"short", title, body); String2IXMLDocument( - text, - wcslen(text), + buf, + wcslen(buf), &inputXml, NULL ); diff --git a/ep_gui/GUI.c b/ep_gui/GUI.c index a5e9eda39..8d5df65c9 100644 --- a/ep_gui/GUI.c +++ b/ep_gui/GUI.c @@ -1913,7 +1913,10 @@ static BOOL GUI_Build(HDC hDC, HWND hwnd, POINT pt) GUI_Build(0, hwnd, pt); fclose(AuditFile); AuditFile = NULL; - MessageBoxW(hwnd, L"Settings have been exported successfully.", GUI_title, MB_ICONINFORMATION); + wchar_t mbText[128]; + mbText[0] = 0; + LoadStringW(hModule, IDS_ABOUT_EXPORT_SUCCESS, mbText, ARRAYSIZE(mbText)); + MessageBoxW(hwnd, mbText, GUI_title, MB_ICONINFORMATION); } } } @@ -2114,14 +2117,10 @@ static BOOL GUI_Build(HDC hDC, HWND hwnd, POINT pt) } else if (!strncmp(line + 1, "clear_data_weather", 18)) { - if (MessageBoxW( - hwnd, - L"Are you sure you want to permanently clear the weather widget's local data?\n\n" - L"This will reset the internal components to their default state, but will preserve " - L"your preferences. This may fix the widget not loading the data properly, or " - L"having layout issues etc.", - _T(PRODUCT_NAME), - MB_ICONQUESTION | MB_YESNO) == IDYES) + wchar_t mbText[512]; + mbText[0] = 0; + LoadStringW(hModule, IDS_WEATHER_CLEAR_PROMPT, mbText, ARRAYSIZE(mbText)); + if (MessageBoxW(hwnd, mbText, _T(PRODUCT_NAME), MB_ICONQUESTION | MB_YESNO) == IDYES) { DWORD dwData = 0, dwVal = 0, dwSize = sizeof(DWORD); GUI_Internal_RegQueryValueExW(NULL, L"Virtualized_" _T(EP_CLSID) L"_PeopleBand", NULL, NULL, &dwData, &dwSize); @@ -2133,7 +2132,9 @@ static BOOL GUI_Build(HDC hDC, HWND hwnd, POINT pt) PleaseWaitCallbackData = &res; PleaseWaitCallbackFunc = GUI_Internal_DeleteWeatherFolder; PleaseWaitHook = SetWindowsHookExW(WH_CALLWNDPROC, PleaseWait_HookProc, NULL, GetCurrentThreadId()); - MessageBoxW(hwnd, L"Please wait...", _T(PRODUCT_NAME), 0); + mbText[0] = 0; + LoadStringW(hModule, IDS_WEATHER_CLEAR_WAIT, mbText, ARRAYSIZE(mbText)); + MessageBoxW(hwnd, mbText, _T(PRODUCT_NAME), 0); } else { @@ -2141,13 +2142,17 @@ static BOOL GUI_Build(HDC hDC, HWND hwnd, POINT pt) } if (res == IDOK) { - MessageBoxW(hwnd, L"Weather widget data cleared successfully.", _T(PRODUCT_NAME), MB_ICONINFORMATION); + mbText[0] = 0; + LoadStringW(hModule, IDS_WEATHER_CLEAR_SUCCESS, mbText, ARRAYSIZE(mbText)); + MessageBoxW(hwnd, mbText, _T(PRODUCT_NAME), MB_ICONINFORMATION); } else { if (res == IDABORT) { - MessageBoxW(hwnd, L"An error has occured while clearing the data.", _T(PRODUCT_NAME), MB_ICONERROR); + mbText[0] = 0; + LoadStringW(hModule, IDS_WEATHER_CLEAR_FAILED, mbText, ARRAYSIZE(mbText)); + MessageBoxW(hwnd, mbText, _T(PRODUCT_NAME), MB_ICONERROR); } } if (dwData) diff --git a/ep_gui/resources/EPSettingsResources.h b/ep_gui/resources/EPSettingsResources.h index 286a07cde..ffe52fdad 100644 --- a/ep_gui/resources/EPSettingsResources.h +++ b/ep_gui/resources/EPSettingsResources.h @@ -270,6 +270,10 @@ #define IDS_WEATHER_LASTUPDATE 1553 #define IDS_WEATHER_UPDATE 1554 #define IDS_WEATHER_CLEAR 1555 +#define IDS_WEATHER_CLEAR_PROMPT 1556 +#define IDS_WEATHER_CLEAR_WAIT 1557 +#define IDS_WEATHER_CLEAR_SUCCESS 1558 +#define IDS_WEATHER_CLEAR_FAILED 1559 #define IDS_SP 1601 #define IDS_SP_HIDEICON 1602 @@ -379,6 +383,7 @@ #define IDS_ABOUT_SETTINGS 2011 #define IDS_ABOUT_IMPORT 2012 #define IDS_ABOUT_EXPORT 2013 -#define IDS_ABOUT_RESET 2014 +#define IDS_ABOUT_EXPORT_SUCCESS 2014 +#define IDS_ABOUT_RESET 2015 #define IDS_FOOTER_RESTART 2101 diff --git a/ep_gui/resources/EPSharedResources.h b/ep_gui/resources/EPSharedResources.h index 7c229a3f1..d2dd43664 100644 --- a/ep_gui/resources/EPSharedResources.h +++ b/ep_gui/resources/EPSharedResources.h @@ -15,6 +15,7 @@ #define IDS_UPDATES_DLFAILED_T 311 #define IDS_UPDATES_DLFAILED_B 312 #define IDS_UPDATES_INSTALLEDVER 313 +#define IDS_UPDATES_PROMPT 314 // 351-400 diff --git a/ep_gui/resources/lang/ep_gui.en-US.rc b/ep_gui/resources/lang/ep_gui.en-US.rc index d03293f26..e2beaded7 100644 --- a/ep_gui/resources/lang/ep_gui.en-US.rc +++ b/ep_gui/resources/lang/ep_gui.en-US.rc @@ -18,6 +18,7 @@ BEGIN IDS_UPDATES_DLFAILED_T "Update failed" IDS_UPDATES_DLFAILED_B "The request was declined or an error has occured when attempting to install this update." IDS_UPDATES_INSTALLEDVER "Installed version: %d.%d.%d.%d" + IDS_UPDATES_PROMPT "Would you like to install an update for ExplorerPatcher?\n\nDownloaded from:\n%s" IDS_SYM_DL_T "Downloading symbols for OS build %s, please wait…" IDS_SYM_DL_B "This may take several minutes. For now, ExplorerPatcher may have limited and/or broken functionality. Click here to learn more about symbols." @@ -308,6 +309,10 @@ BEGIN IDS_WEATHER_LASTUPDATE "Last updated on: %s, %s." IDS_WEATHER_UPDATE "Update weather now" IDS_WEATHER_CLEAR "Clear weather widget local data" + IDS_WEATHER_CLEAR_PROMPT "Are you sure you want to permanently clear the weather widget's local data?\n\nThis will reset the internal components to their default state, but will preserve your preferences. This may fix the widget not loading the data properly, or having layout issues etc." + IDS_WEATHER_CLEAR_WAIT "Please wait…" + IDS_WEATHER_CLEAR_SUCCESS "Weather widget data cleared successfully." + IDS_WEATHER_CLEAR_FAILED "An error has occured while clearing the data." IDS_SP "Spotlight" @@ -422,6 +427,7 @@ BEGIN IDS_ABOUT_SETTINGS "Learn more managing these settings" IDS_ABOUT_IMPORT "Import settings" IDS_ABOUT_EXPORT "Export current settings" + IDS_ABOUT_EXPORT_SUCCESS "Settings have been exported successfully." IDS_ABOUT_RESET "Restore default settings" IDS_FOOTER_RESTART "Restart File Explorer" diff --git a/ep_gui/resources/settings.reg b/ep_gui/resources/settings.reg index c9bd21f51..7aa934031 100644 --- a/ep_gui/resources/settings.reg +++ b/ep_gui/resources/settings.reg @@ -772,7 +772,7 @@ ;import ;u %R:2013% ;export -;u %R:2014% +;u %R:2015% ;reset diff --git a/ep_gui/resources/settings10.reg b/ep_gui/resources/settings10.reg index 2bb6589df..ac23c31ab 100644 --- a/ep_gui/resources/settings10.reg +++ b/ep_gui/resources/settings10.reg @@ -593,7 +593,7 @@ ;import ;u %R:2013% ;export -;u %R:2014% +;u %R:2015% ;reset From 163b45228ac5df181190a1766301b0acb28863b0 Mon Sep 17 00:00:00 2001 From: Amrsatrio Date: Sun, 12 Nov 2023 11:49:59 +0700 Subject: [PATCH 06/12] L10N: Localized Setup --- .gitmodules | 3 ++ ep_gui/GUI.c | 2 +- ep_setup/ep_setup.c | 56 +++++++--------------- ep_setup/ep_setup.vcxproj | 6 ++- ep_setup/resource.h | 7 +++ ep_setup/resources/ep_setup.en-US.rc | 14 ++++++ ep_setup/{ => resources}/ep_setup.rc | 0 ep_setup/{ => resources}/ep_setup_debug.rc | 0 8 files changed, 47 insertions(+), 41 deletions(-) create mode 100644 ep_setup/resources/ep_setup.en-US.rc rename ep_setup/{ => resources}/ep_setup.rc (100%) rename ep_setup/{ => resources}/ep_setup_debug.rc (100%) diff --git a/.gitmodules b/.gitmodules index 09c73f99b..d5db00a7c 100644 --- a/.gitmodules +++ b/.gitmodules @@ -13,3 +13,6 @@ [submodule "ep_dwm"] path = ep_dwm url = https://github.com/valinet/ep_dwm +[submodule "ExplorerPatcher-L10N"] + path = ExplorerPatcher-L10N + url = https://github.com/valinet/ExplorerPatcher-L10N diff --git a/ep_gui/GUI.c b/ep_gui/GUI.c index 8d5df65c9..47cf8b685 100644 --- a/ep_gui/GUI.c +++ b/ep_gui/GUI.c @@ -1913,7 +1913,7 @@ static BOOL GUI_Build(HDC hDC, HWND hwnd, POINT pt) GUI_Build(0, hwnd, pt); fclose(AuditFile); AuditFile = NULL; - wchar_t mbText[128]; + wchar_t mbText[256]; mbText[0] = 0; LoadStringW(hModule, IDS_ABOUT_EXPORT_SUCCESS, mbText, ARRAYSIZE(mbText)); MessageBoxW(hwnd, mbText, GUI_title, MB_ICONINFORMATION); diff --git a/ep_setup/ep_setup.c b/ep_setup/ep_setup.c index 947e80b5e..65bdfeea4 100644 --- a/ep_setup/ep_setup.c +++ b/ep_setup/ep_setup.c @@ -546,12 +546,10 @@ int WINAPI wWinMain( bIsUpdate = (argc >= 1 && !_wcsicmp(wargv[0], L"/update_silent")); if (!bInstall && (!_wcsicmp(wargv[0], L"/uninstall") || bForcePromptForUninstall)) { - if (MessageBoxW( - NULL, - L"Are you sure you want to remove " _T(PRODUCT_NAME) L" from your computer?", - _T(PRODUCT_NAME), - MB_YESNO | MB_DEFBUTTON2 | MB_ICONQUESTION - ) == IDNO) + wchar_t mbText[256]; + mbText[0] = 0; + LoadStringW(hInstance, IDS_SETUP_UNINSTALL_PROMPT, mbText, ARRAYSIZE(mbText)); + if (MessageBoxW(NULL, mbText, _T(PRODUCT_NAME), MB_YESNO | MB_DEFBUTTON2 | MB_ICONQUESTION) == IDNO) { exit(0); } @@ -581,13 +579,10 @@ int WINAPI wWinMain( RegGetValueW(HKEY_LOCAL_MACHINE, L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Shell\\Update\\Packages", L"UndockingDisabled", RRF_RT_DWORD, NULL, &bIsUndockingDisabled, &dwSize); if (bIsUndockingDisabled) { - if (MessageBoxW( - NULL, - bInstall ? L"In order to install, you will be automatically signed out of Windows. The software will be ready for use when you sign back in.\n\nDo you want to continue?" - : L"To complete the uninstallation, you will be automatically signed out of Windows.\n\nDo you want to continue?", - _T(PRODUCT_NAME), - MB_YESNO | MB_DEFBUTTON1 | MB_ICONQUESTION - ) == IDYES) + wchar_t mbText[256]; + mbText[0] = 0; + LoadStringW(hInstance, bInstall ? IDS_SETUP_INSTALL_LOGOFF : IDS_SETUP_UNINSTALL_LOGOFF, mbText, ARRAYSIZE(mbText)); + if (MessageBoxW(NULL, mbText, _T(PRODUCT_NAME), MB_YESNO | MB_DEFBUTTON1 | MB_ICONQUESTION) == IDYES) { RegDeleteKeyValueW(HKEY_LOCAL_MACHINE, L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Shell\\Update\\Packages", L"UndockingDisabled"); } @@ -1179,26 +1174,20 @@ int WINAPI wWinMain( { if (!bInstall) { + wchar_t mbText[256]; + mbText[0] = 0; if (bWasShellExt) { - if (MessageBoxW( - NULL, - L"Please reboot the computer to complete the uninstall.\n\nDo you want to reboot now?", - _T(PRODUCT_NAME), - MB_YESNO | MB_DEFBUTTON1 | MB_ICONQUESTION - ) == IDYES) + LoadStringW(hInstance, IDS_SETUP_UNINSTALL_RESTART, mbText, ARRAYSIZE(mbText)); + if (MessageBoxW(NULL, mbText, _T(PRODUCT_NAME), MB_YESNO | MB_DEFBUTTON1 | MB_ICONQUESTION) == IDYES) { SystemShutdown(TRUE); } } else { - MessageBoxW( - NULL, - L"Uninstall completed. Thank you for using " _T(PRODUCT_NAME) L".", - _T(PRODUCT_NAME), - MB_ICONASTERISK | MB_OK | MB_DEFBUTTON1 - ); + LoadStringW(hInstance, IDS_SETUP_UNINSTALL_FINISH, mbText, ARRAYSIZE(mbText)); + MessageBoxW(NULL, mbText, _T(PRODUCT_NAME), MB_ICONASTERISK | MB_OK | MB_DEFBUTTON1); } } else @@ -1242,19 +1231,10 @@ int WINAPI wWinMain( } if (!bOk) // && !(argc >= 1 && !_wcsicmp(wargv[0], L"/update_silent")) { - MessageBoxW( - NULL, - L"An error has occurred while servicing this product.\n" - L"This is most likely caused by one or more of the backup files from a previous update still being in use. " - L"Unlocking the files should fix this issue.\n\n" - L"Troubleshooting steps:\n" - L"* Close and reopen the \"Properties\" dialog if it is currently open.\n" - L"* Kill and restart all \"explorer.exe\" processes.\n" - L"* If you have registered this application as a shell extension, then restarting the computer will probably fix this.\n" - L"* Lastly, reboot the computer and try again.", - _T(PRODUCT_NAME), - MB_ICONERROR | MB_OK | MB_DEFBUTTON1 - ); + wchar_t mbText[1024]; + mbText[0] = 0; + LoadStringW(hInstance, IDS_SETUP_FAILED, mbText, ARRAYSIZE(mbText)); + MessageBoxW(NULL, mbText, _T(PRODUCT_NAME), MB_ICONERROR | MB_OK | MB_DEFBUTTON1); } if (bOk && bIsUndockingDisabled) { diff --git a/ep_setup/ep_setup.vcxproj b/ep_setup/ep_setup.vcxproj index 24fcaacd0..85237a649 100644 --- a/ep_setup/ep_setup.vcxproj +++ b/ep_setup/ep_setup.vcxproj @@ -159,14 +159,16 @@ - + true true - + true true + + diff --git a/ep_setup/resource.h b/ep_setup/resource.h index 75fe28b2a..ab86dba6e 100644 --- a/ep_setup/resource.h +++ b/ep_setup/resource.h @@ -11,6 +11,13 @@ #define IDR_EP_STARTMENU 108 #define IDR_EP_GUI 109 +#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 + // Next default values for new objects // diff --git a/ep_setup/resources/ep_setup.en-US.rc b/ep_setup/resources/ep_setup.en-US.rc new file mode 100644 index 000000000..8a585f12e --- /dev/null +++ b/ep_setup/resources/ep_setup.en-US.rc @@ -0,0 +1,14 @@ +#include "resource.h" +#include "winres.h" + +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US + +STRINGTABLE +BEGIN + 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?" + IDS_SETUP_UNINSTALL_RESTART "Please reboot the PC to complete the uninstall.\n\nDo you want to reboot now?" + IDS_SETUP_UNINSTALL_FINISH "Uninstall completed. Thank you for using ExplorerPatcher." + IDS_SETUP_FAILED "An error has occurred while servicing ExplorerPatcher.\nThis is most likely caused by one or more of the backup files from a previous update still being in use. Unlocking the files should fix this issue.\n\nTroubleshooting steps:\n• Close and reopen the ""Properties"" dialog if it is currently open.\n• Kill and restart all ""explorer.exe"" processes.\n• If you have registered ExplorerPatcher as a shell extension, then restarting the PC will probably fix this.\n• Lastly, reboot the PC and try again.", +END diff --git a/ep_setup/ep_setup.rc b/ep_setup/resources/ep_setup.rc similarity index 100% rename from ep_setup/ep_setup.rc rename to ep_setup/resources/ep_setup.rc diff --git a/ep_setup/ep_setup_debug.rc b/ep_setup/resources/ep_setup_debug.rc similarity index 100% rename from ep_setup/ep_setup_debug.rc rename to ep_setup/resources/ep_setup_debug.rc From b45f79f25ddfcad852d48ad6941cc4c871b5795d Mon Sep 17 00:00:00 2001 From: Amrsatrio Date: Sun, 12 Nov 2023 14:00:35 +0700 Subject: [PATCH 07/12] Setup: Reorganized resources --- ep_gui/resources/lang/ep_gui.en-US.rc | 4 ++-- ep_setup/ep_setup.c | 2 +- ep_setup/ep_setup.vcxproj | 2 +- ep_setup/resources/{ => lang}/ep_setup.en-US.rc | 4 ++-- ep_setup/{ => resources}/resource.h | 0 5 files changed, 6 insertions(+), 6 deletions(-) rename ep_setup/resources/{ => lang}/ep_setup.en-US.rc (93%) rename ep_setup/{ => resources}/resource.h (100%) diff --git a/ep_gui/resources/lang/ep_gui.en-US.rc b/ep_gui/resources/lang/ep_gui.en-US.rc index e2beaded7..8b5e678bf 100644 --- a/ep_gui/resources/lang/ep_gui.en-US.rc +++ b/ep_gui/resources/lang/ep_gui.en-US.rc @@ -392,13 +392,13 @@ BEGIN IDS_ADV_LEARN "Learn more" IDS_ADV_CONSOLE "Enable console" IDS_ADV_MEMCHECK "Dump memory leaks" - IDS_ADV_AUTOHIDE "Double click taskbar to toggle auto-hide (only works when the taskbar is locked)" + IDS_ADV_AUTOHIDE "Double click taskbar to toggle auto-hide (only works when locked)" IDS_ADV_PAINTDESKTOPVERSION "Show Windows build info on the desktop" IDS_ADV_CLASSICTHEME "Enable advanced mitigations for correct rendering using classic theme" IDS_ADV_SYSLISTVIEW32 "Enable SysListView32 for Explorer views" IDS_ADV_NOPROPERTIES "Do not change the taskbar context menu (e.g. do not display the ""Properties"" item)" IDS_ADV_SYMBOLS "Enable symbols download" - IDS_ADV_PINNEDITEMS "Pinned items act as quick launch (don't group pinned items with active apps)" + IDS_ADV_PINNEDITEMS "Pinned items act as quick launch (don't group with active apps)" IDS_ADV_REMOVEEXTRAGAP "When the taskbar shows button labels, remove the extra gap around pinned items" IDS_ADV_DELAY "Supplementary delay at logon" IDS_ADV_DELAY_0 "None (default)" diff --git a/ep_setup/ep_setup.c b/ep_setup/ep_setup.c index 65bdfeea4..a926610a7 100644 --- a/ep_setup/ep_setup.c +++ b/ep_setup/ep_setup.c @@ -5,7 +5,7 @@ processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"") #include #include #pragma comment(lib, "Shlwapi.lib") -#include "resource.h" +#include "resources/resource.h" #include "../ExplorerPatcher/utility.h" BOOL ShouldDownloadOrDelete(BOOL bInstall, HINSTANCE hInstance, LPCWSTR wszPath, LPCSTR chash) diff --git a/ep_setup/ep_setup.vcxproj b/ep_setup/ep_setup.vcxproj index 85237a649..74755a590 100644 --- a/ep_setup/ep_setup.vcxproj +++ b/ep_setup/ep_setup.vcxproj @@ -156,7 +156,7 @@ - + diff --git a/ep_setup/resources/ep_setup.en-US.rc b/ep_setup/resources/lang/ep_setup.en-US.rc similarity index 93% rename from ep_setup/resources/ep_setup.en-US.rc rename to ep_setup/resources/lang/ep_setup.en-US.rc index 8a585f12e..b56cc6bc4 100644 --- a/ep_setup/resources/ep_setup.en-US.rc +++ b/ep_setup/resources/lang/ep_setup.en-US.rc @@ -1,4 +1,4 @@ -#include "resource.h" +#include "resources/resource.h" #include "winres.h" LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US @@ -10,5 +10,5 @@ BEGIN IDS_SETUP_UNINSTALL_LOGOFF "To complete the uninstallation, you will be automatically signed out of Windows.\n\nDo you want to continue?" IDS_SETUP_UNINSTALL_RESTART "Please reboot the PC to complete the uninstall.\n\nDo you want to reboot now?" IDS_SETUP_UNINSTALL_FINISH "Uninstall completed. Thank you for using ExplorerPatcher." - IDS_SETUP_FAILED "An error has occurred while servicing ExplorerPatcher.\nThis is most likely caused by one or more of the backup files from a previous update still being in use. Unlocking the files should fix this issue.\n\nTroubleshooting steps:\n• Close and reopen the ""Properties"" dialog if it is currently open.\n• Kill and restart all ""explorer.exe"" processes.\n• If you have registered ExplorerPatcher as a shell extension, then restarting the PC will probably fix this.\n• Lastly, reboot the PC and try again.", + IDS_SETUP_FAILED "An error has occurred while servicing ExplorerPatcher.\nThis is most likely caused by one or more of the backup files from a previous update still being in use. Unlocking the files should fix this issue.\n\nTroubleshooting steps:\n• Close and reopen the ""Properties"" dialog if it is currently open.\n• Kill and restart all ""explorer.exe"" processes.\n• If you have registered ExplorerPatcher as a shell extension, then restarting the PC will probably fix this.\n• Lastly, reboot the PC and try again." END diff --git a/ep_setup/resource.h b/ep_setup/resources/resource.h similarity index 100% rename from ep_setup/resource.h rename to ep_setup/resources/resource.h From 2dc13402076d683ba564251458762efbcaee2d9a Mon Sep 17 00:00:00 2001 From: Amrsatrio Date: Sun, 12 Nov 2023 14:13:16 +0700 Subject: [PATCH 08/12] File Explorer: Added option to disable the modern navigation bar (FEMNB). - The code for disabling tabs (TIFE) is also there, but it doesn't work on 22621.2506+ -- it fallbacks to the Windows 10 Ribbon instead so I'm hiding it for now. - This should also fix window position saving when using Windows 10 Ribbon on builds with TIFE enabled, up to 23570 (Dev). --- ExplorerPatcher-L10N | 1 + ExplorerPatcher/dllmain.c | 38 ++++++++++++++++++++++---- ep_gui/resources/EPSettingsResources.h | 2 ++ ep_gui/resources/lang/ep_gui.en-US.rc | 2 ++ ep_gui/resources/settings.reg | 3 +- 5 files changed, 40 insertions(+), 6 deletions(-) create mode 160000 ExplorerPatcher-L10N diff --git a/ExplorerPatcher-L10N b/ExplorerPatcher-L10N new file mode 160000 index 000000000..4a7eaa5ec --- /dev/null +++ b/ExplorerPatcher-L10N @@ -0,0 +1 @@ +Subproject commit 4a7eaa5ecb493a49ef33a206681de13fa6b413ec diff --git a/ExplorerPatcher/dllmain.c b/ExplorerPatcher/dllmain.c index 8cdc34126..28cb4db43 100644 --- a/ExplorerPatcher/dllmain.c +++ b/ExplorerPatcher/dllmain.c @@ -3877,7 +3877,7 @@ HWND WINAPI explorerframe_SHCreateWorkerWindowHook( KEY_READ | KEY_WOW64_64KEY, NULL, (LPDWORD)(&dwSize) - ) == ERROR_SUCCESS && (dwSize < 4) && dwExStyle == 0x10000 && dwStyle == 1174405120) + ) == ERROR_SUCCESS && (dwSize < 4) && dwExStyle == 0x10000 && dwStyle == 0x46000000) { result = 0; } @@ -3906,6 +3906,13 @@ HWND WINAPI explorerframe_SHCreateWorkerWindowHook( { SetWindowSubclass(hWndParent, HideExplorerSearchBarSubClass, HideExplorerSearchBarSubClass, 0); } + if (IsWindows11Version22H2OrHigher()) + { + // Fix initial title bar style after disabling TIFE + // If we don't do this, it will only fix itself once the user changes the system color scheme or toggling transparency effects + BOOL value = ShouldAppsUseDarkMode(); + DwmSetWindowAttribute(hWndParent, DWMWA_USE_IMMERSIVE_DARK_MODE, &value, sizeof(BOOL)); + } } return result; } @@ -8606,7 +8613,7 @@ DEFINE_GUID(IID_UIRibbonFramework, HRESULT ExplorerFrame_CoCreateInstanceHook(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID riid, LPVOID* ppv) { - if (dwFileExplorerCommandUI != 0 && IsEqualCLSID(rclsid, &CLSID_XamlIslandViewAdapter)) + if (dwFileExplorerCommandUI != 0 && dwFileExplorerCommandUI != 3 && dwFileExplorerCommandUI != 4 && IsEqualCLSID(rclsid, &CLSID_XamlIslandViewAdapter)) { return REGDB_E_CLASSNOTREG; } @@ -9653,10 +9660,22 @@ int RtlQueryFeatureConfigurationHook(UINT32 featureId, int sectionType, INT64* c break; } #endif -#if 1 + case 37634385: // TIFE "Tabs in File Explorer" + { + if (dwFileExplorerCommandUI == 1 // Windows 10 Ribbon <-- fixes saving of window position and size + || dwFileExplorerCommandUI == 2 // Windows 7 Command Bar <-- fixes menu bar behavior + || dwFileExplorerCommandUI == 3) // Windows 11 Command Bar (no Tabs, classic Address Bar) <-- provides option to disable tabs in File Explorer + { + // Removed in 23575.1000+ + buffer->enabledState = FEATURE_ENABLED_STATE_DISABLED; + } + break; + } case 40729001: // WASDKInFileExplorer { - if (dwFileExplorerCommandUI != 0) + if (dwFileExplorerCommandUI == 1 // Windows 10 Ribbon <-- fixes crashing when navigating back to a WASDK view + || dwFileExplorerCommandUI == 2 // Windows 7 Command Bar <-- ditto + || dwFileExplorerCommandUI == 3) // Windows 11 Command Bar (no Tabs, classic Address Bar) <-- fixes crashing when opening an Explorer window { // Disable the new Windows App SDK views (in Home and Gallery) when not using the Windows 11 command bar // @@ -9673,7 +9692,16 @@ int RtlQueryFeatureConfigurationHook(UINT32 featureId, int sectionType, INT64* c } break; } -#endif + case 40950262: // FEMNB "File Explorer Modern Navigation Bar" + { + if (dwFileExplorerCommandUI == 3 // Windows 11 Command Bar (no Tabs, classic Address Bar) + || dwFileExplorerCommandUI == 4) // Windows 11 Command Bar (classic Address Bar) + { + // Option to disable the new navigation bar + buffer->enabledState = FEATURE_ENABLED_STATE_DISABLED; + } + break; + } #if 0 case 42952021: // CategorySpecificXamlExtensions { diff --git a/ep_gui/resources/EPSettingsResources.h b/ep_gui/resources/EPSettingsResources.h index ffe52fdad..72fc4bfaf 100644 --- a/ep_gui/resources/EPSettingsResources.h +++ b/ep_gui/resources/EPSettingsResources.h @@ -119,6 +119,8 @@ #define IDS_EXP_MICA_0 1226 #define IDS_EXP_MICA_1 1227 #define IDS_EXP_MICA_2 1228 +#define IDS_EXP_CTRLINTF_3 1229 +#define IDS_EXP_CTRLINTF_4 1230 #define IDS_START 1301 #define IDS_START_STYLE 1302 diff --git a/ep_gui/resources/lang/ep_gui.en-US.rc b/ep_gui/resources/lang/ep_gui.en-US.rc index 8b5e678bf..2c837bbc9 100644 --- a/ep_gui/resources/lang/ep_gui.en-US.rc +++ b/ep_gui/resources/lang/ep_gui.en-US.rc @@ -140,6 +140,8 @@ BEGIN IDS_EXP_CTRLINTF_0_W10 "Windows 10 Ribbon (default)" IDS_EXP_CTRLINTF_1_W11 "Windows 10 Ribbon" IDS_EXP_CTRLINTF_2 "Windows 7 Command Bar" + IDS_EXP_CTRLINTF_3 "Windows 11 Command Bar (no Tabs, classic Address Bar)" + IDS_EXP_CTRLINTF_4 "Windows 11 Command Bar (classic Address Bar)" IDS_EXP_NEWWINDOWS "The following settings take effect on newly created File Explorer windows:" IDS_EXP_IMMERSIVEMENUS "Use immersive menus when displaying Windows 10 context menus" IDS_EXP_DISABLENAVBAR "Disable navigation bar" diff --git a/ep_gui/resources/settings.reg b/ep_gui/resources/settings.reg index 7aa934031..cb57f05a5 100644 --- a/ep_gui/resources/settings.reg +++ b/ep_gui/resources/settings.reg @@ -205,8 +205,9 @@ ;b %R:1208% "UseClassicDriveGrouping"=dword:00000000 [HKEY_CURRENT_USER\Software\ExplorerPatcher] -;c 3 %R:1209% * +;c 4 %R:1209% * ;x 0 %R:1210% +;x 4 %R:1230% ;x 1 %R:1212% ;x 2 %R:1213% ;"Virtualized_{D17F1E1A-5919-4427-8F89-A1A8503CA3EB}_FileExplorerCommandUI"=dword:00000000 From f62c53253c20d78df38228feac5a87597230b29b Mon Sep 17 00:00:00 2001 From: Amrsatrio Date: Sun, 12 Nov 2023 15:26:12 +0700 Subject: [PATCH 09/12] File Explorer: Restored "Apply Mica" functionality on 22H2 --- ExplorerPatcher-L10N | 2 +- ExplorerPatcher/dllmain.c | 16 ++++++++--- ep_gui/GUI.c | 7 ++--- ep_gui/resources/EPSettingsResources.h | 37 ++++++++++++-------------- ep_gui/resources/lang/ep_gui.en-US.rc | 5 +--- ep_gui/resources/settings.reg | 35 +++++++++++------------- ep_gui/resources/settings10.reg | 16 +++++------ 7 files changed, 59 insertions(+), 59 deletions(-) diff --git a/ExplorerPatcher-L10N b/ExplorerPatcher-L10N index 4a7eaa5ec..414761f62 160000 --- a/ExplorerPatcher-L10N +++ b/ExplorerPatcher-L10N @@ -1 +1 @@ -Subproject commit 4a7eaa5ecb493a49ef33a206681de13fa6b413ec +Subproject commit 414761f62e8bc71f941a2e970432fff682d534eb diff --git a/ExplorerPatcher/dllmain.c b/ExplorerPatcher/dllmain.c index 28cb4db43..0a543c7ae 100644 --- a/ExplorerPatcher/dllmain.c +++ b/ExplorerPatcher/dllmain.c @@ -3898,7 +3898,7 @@ HWND WINAPI explorerframe_SHCreateWorkerWindowHook( { SetWindowSubclass(hWndParent, HideIconAndTitleInExplorerSubClass, HideIconAndTitleInExplorerSubClass, 0); } - if (bMicaEffectOnTitlebar) + if ((!bIsExplorerProcess || dwFileExplorerCommandUI == 2) && bMicaEffectOnTitlebar) { SetWindowSubclass(result, ExplorerMicaTitlebarSubclassProc, ExplorerMicaTitlebarSubclassProc, bMicaEffectOnTitlebar); } @@ -3906,12 +3906,20 @@ HWND WINAPI explorerframe_SHCreateWorkerWindowHook( { SetWindowSubclass(hWndParent, HideExplorerSearchBarSubClass, HideExplorerSearchBarSubClass, 0); } - if (IsWindows11Version22H2OrHigher()) + if (bIsExplorerProcess && dwFileExplorerCommandUI != 0 && IsWindows11Version22H2OrHigher()) { // Fix initial title bar style after disabling TIFE // If we don't do this, it will only fix itself once the user changes the system color scheme or toggling transparency effects - BOOL value = ShouldAppsUseDarkMode(); - DwmSetWindowAttribute(hWndParent, DWMWA_USE_IMMERSIVE_DARK_MODE, &value, sizeof(BOOL)); + if (!ShouldAppsUseDarkMode) + { + HANDLE hUxtheme = LoadLibraryW(L"uxtheme.dll"); + ShouldAppsUseDarkMode = GetProcAddress(hUxtheme, (LPCSTR)0x84); + } + if (ShouldAppsUseDarkMode) + { + BOOL value = ShouldAppsUseDarkMode(); + DwmSetWindowAttribute(hWndParent, DWMWA_USE_IMMERSIVE_DARK_MODE, &value, sizeof(BOOL)); + } } } return result; diff --git a/ep_gui/GUI.c b/ep_gui/GUI.c index 47cf8b685..9e5eedb9c 100644 --- a/ep_gui/GUI.c +++ b/ep_gui/GUI.c @@ -467,7 +467,8 @@ LSTATUS GUI_Internal_RegSetValueExW( } else if (!wcscmp(lpValueName, L"Virtualized_" _T(EP_CLSID) L"_FileExplorerCommandUI")) { - if (!*(DWORD*)lpData) + DWORD dwValue = *(DWORD*)lpData; + if (dwValue == 0 || dwValue == 3 || dwValue == 4) // This no longer has any effect on 22H2 { RegDeleteTreeW(HKEY_CURRENT_USER, L"SOFTWARE\\Classes\\CLSID\\{d93ed569-3b3e-4bff-8355-3c44f6a52bb5}"); } @@ -724,12 +725,12 @@ LSTATUS GUI_Internal_RegQueryValueExW( } else if (!wcscmp(lpValueName, L"Virtualized_" _T(EP_CLSID) L"_FileExplorerCommandUI")) { - if (RegGetValueW(HKEY_CURRENT_USER, L"SOFTWARE\\Classes\\CLSID\\{d93ed569-3b3e-4bff-8355-3c44f6a52bb5}\\InProcServer32", L"", RRF_RT_REG_SZ, NULL, NULL, NULL) != ERROR_SUCCESS) + /*if (RegGetValueW(HKEY_CURRENT_USER, L"SOFTWARE\\Classes\\CLSID\\{d93ed569-3b3e-4bff-8355-3c44f6a52bb5}\\InProcServer32", L"", RRF_RT_REG_SZ, NULL, NULL, NULL) != ERROR_SUCCESS) { *lpcbData = sizeof(DWORD); *(DWORD*)lpData = 0; return ERROR_SUCCESS; - } + }*/ return RegQueryValueExW(hKey, L"FileExplorerCommandUI", lpReserved, lpType, lpData, lpcbData); } else if (!wcscmp(lpValueName, L"Virtualized_" _T(EP_CLSID) L"_RegisterAsShellExtension")) diff --git a/ep_gui/resources/EPSettingsResources.h b/ep_gui/resources/EPSettingsResources.h index 72fc4bfaf..9f57c5e8a 100644 --- a/ep_gui/resources/EPSettingsResources.h +++ b/ep_gui/resources/EPSettingsResources.h @@ -101,26 +101,23 @@ #define IDS_EXP_CLASSICDRIVEGROUP 1208 #define IDS_EXP_CTRLINTF 1209 #define IDS_EXP_CTRLINTF_0_W11 1210 -#define IDS_EXP_CTRLINTF_0_W10 1211 -#define IDS_EXP_CTRLINTF_1_W11 1212 -#define IDS_EXP_CTRLINTF_2 1213 -#define IDS_EXP_NEWWINDOWS 1214 -#define IDS_EXP_IMMERSIVEMENUS 1215 -#define IDS_EXP_DISABLENAVBAR 1216 -#define IDS_EXP_DISABLESEARCHBAR 1217 -#define IDS_EXP_SHRINKADDRESSBAR 1218 -#define IDS_EXP_HIDESEARCHBAR 1219 -#define IDS_EXP_TITLEBAR 1220 -#define IDS_EXP_TITLEBAR_0 1221 -#define IDS_EXP_TITLEBAR_1 1222 -#define IDS_EXP_TITLEBAR_2 1223 -#define IDS_EXP_TITLEBAR_3 1224 -#define IDS_EXP_MICA 1225 -#define IDS_EXP_MICA_0 1226 -#define IDS_EXP_MICA_1 1227 -#define IDS_EXP_MICA_2 1228 -#define IDS_EXP_CTRLINTF_3 1229 -#define IDS_EXP_CTRLINTF_4 1230 +#define IDS_EXP_CTRLINTF_3 1211 +#define IDS_EXP_CTRLINTF_4 1212 +#define IDS_EXP_CTRLINTF_0_W10 1213 +#define IDS_EXP_CTRLINTF_1_W11 1214 +#define IDS_EXP_CTRLINTF_2 1215 +#define IDS_EXP_NEWWINDOWS 1216 +#define IDS_EXP_IMMERSIVEMENUS 1217 +#define IDS_EXP_DISABLENAVBAR 1218 +#define IDS_EXP_DISABLESEARCHBAR 1219 +#define IDS_EXP_SHRINKADDRESSBAR 1220 +#define IDS_EXP_HIDESEARCHBAR 1221 +#define IDS_EXP_TITLEBAR 1222 +#define IDS_EXP_TITLEBAR_0 1223 +#define IDS_EXP_TITLEBAR_1 1224 +#define IDS_EXP_TITLEBAR_2 1225 +#define IDS_EXP_TITLEBAR_3 1226 +#define IDS_EXP_MICA 1227 #define IDS_START 1301 #define IDS_START_STYLE 1302 diff --git a/ep_gui/resources/lang/ep_gui.en-US.rc b/ep_gui/resources/lang/ep_gui.en-US.rc index 2c837bbc9..f25310766 100644 --- a/ep_gui/resources/lang/ep_gui.en-US.rc +++ b/ep_gui/resources/lang/ep_gui.en-US.rc @@ -153,10 +153,7 @@ BEGIN IDS_EXP_TITLEBAR_1 "Hide title, show icon" IDS_EXP_TITLEBAR_2 "Hide icon, show title" IDS_EXP_TITLEBAR_3 "Hide icon and title" - IDS_EXP_MICA "Apply Mica effect on these areas" - IDS_EXP_MICA_0 "Let File Explorer decide (default)" - IDS_EXP_MICA_1 "Title bar, command bar and navigation bar" - IDS_EXP_MICA_2 "Nowhere" + IDS_EXP_MICA "Apply Mica effect to the navigation bar of Windows 7 Explorer windows" IDS_START "Start menu" diff --git a/ep_gui/resources/settings.reg b/ep_gui/resources/settings.reg index cb57f05a5..18d71a81d 100644 --- a/ep_gui/resources/settings.reg +++ b/ep_gui/resources/settings.reg @@ -207,41 +207,38 @@ [HKEY_CURRENT_USER\Software\ExplorerPatcher] ;c 4 %R:1209% * ;x 0 %R:1210% -;x 4 %R:1230% -;x 1 %R:1212% -;x 2 %R:1213% +;x 4 %R:1212% +;x 1 %R:1214% +;x 2 %R:1215% ;"Virtualized_{D17F1E1A-5919-4427-8F89-A1A8503CA3EB}_FileExplorerCommandUI"=dword:00000000 -;t %R:1214% +;t %R:1216% [HKEY_CURRENT_USER\Software\ExplorerPatcher] -;i %R:1215% ** +;i %R:1217% ** "DisableImmersiveContextMenu"=dword:00000000 [-HKEY_CURRENT_USER\Software\Classes\CLSID\{056440FD-8568-48e7-A632-72157243B55B}\InprocServer32] -;d %R:1216% ** +;d %R:1218% ** @="" [HKEY_CURRENT_USER\Software\ExplorerPatcher] -;b %R:1217% +;b %R:1219% ;"Virtualized_{D17F1E1A-5919-4427-8F89-A1A8503CA3EB}_DisableModernSearchBar"=dword:00000000 [HKEY_CURRENT_USER\Software\ExplorerPatcher] -;b %R:1218% ** +;b %R:1220% ** "ShrinkExplorerAddressBar"=dword:00000000 [HKEY_CURRENT_USER\Software\ExplorerPatcher] -;b %R:1219% ** +;b %R:1221% ** "HideExplorerSearchBar"=dword:00000000 ;s Explorer_TitlebarSection !IsWindows11Version22H2OrHigher [HKEY_CURRENT_USER\Software\ExplorerPatcher] -;c 4 %R:1220% -;x 0 %R:1221% -;x 1 %R:1222% -;x 2 %R:1223% -;x 3 %R:1224% +;c 4 %R:1222% +;x 0 %R:1223% +;x 1 %R:1224% +;x 2 %R:1225% +;x 3 %R:1226% "HideIconAndTitleInExplorer"=dword:00000000 +;g Explorer_TitlebarSection [HKEY_CURRENT_USER\Software\ExplorerPatcher] -;c 3 %R:1225% -;x 0 %R:1226% -;x 1 %R:1227% -;x 2 %R:1228% +;b %R:1227% ** "MicaEffectOnTitlebar"=dword:00000000 -;g Explorer_TitlebarSection diff --git a/ep_gui/resources/settings10.reg b/ep_gui/resources/settings10.reg index ac23c31ab..68eb3d929 100644 --- a/ep_gui/resources/settings10.reg +++ b/ep_gui/resources/settings10.reg @@ -151,24 +151,24 @@ "UseClassicDriveGrouping"=dword:00000000 [HKEY_CURRENT_USER\Software\ExplorerPatcher] ;c 2 %R:1209% -;x 0 %R:1211% -;x 2 %R:1213% +;x 0 %R:1213% +;x 2 %R:1215% "FileExplorerCommandUI"=dword:00000000 -;t %R:1214% +;t %R:1216% [HKEY_CURRENT_USER\Software\ExplorerPatcher] -;i %R:1215% ** +;i %R:1217% ** "DisableImmersiveContextMenu"=dword:00000000 [-HKEY_CURRENT_USER\Software\Classes\CLSID\{056440FD-8568-48e7-A632-72157243B55B}\InprocServer32] -;d %R:1216% ** +;d %R:1218% ** @="" [HKEY_CURRENT_USER\Software\ExplorerPatcher] -;b %R:1217% +;b %R:1219% ;"Virtualized_{D17F1E1A-5919-4427-8F89-A1A8503CA3EB}_DisableModernSearchBar"=dword:00000000 [HKEY_CURRENT_USER\Software\ExplorerPatcher] -;b %R:1218% ** +;b %R:1220% ** "ShrinkExplorerAddressBar"=dword:00000000 [HKEY_CURRENT_USER\Software\ExplorerPatcher] -;b %R:1219% ** +;b %R:1221% ** "HideExplorerSearchBar"=dword:00000000 ;p 2 ;b Mica effect on title bar From a0f9c0c7dc972c9012493120eebfca8984c3d216 Mon Sep 17 00:00:00 2001 From: Amrsatrio Date: Sun, 12 Nov 2023 17:12:04 +0700 Subject: [PATCH 10/12] Version: 22621.2506.60.1 (Pre-release) --- CHANGELOG.md | 28 +++++++++++++++++++++++++++ ExplorerPatcher-L10N | 2 +- ep_gui/resources/lang/ep_gui.en-US.rc | 2 +- version.h | 4 ++-- 4 files changed, 32 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ea043aff7..c81869bce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,34 @@ This document includes the same release notes as in the [Releases](https://github.com/valinet/ExplorerPatcher/releases) section on GitHub. +## 22621.2506.60 + +Tested on OS builds 22000.2416, 22621.2361, 22621.2506, and 23585.1001. + +#### Details + +##### 1 + +* Taskbar10: Partially fixed Windows 11 Start menu and Search positioning on builds 23545+ (Dev). (ac268b1) + * Changing the taskbar alignment requires restarting `explorer.exe` in order to take effect. +* File Explorer: Added option to disable the modern navigation bar of Moment 4. (2dc1340) +* File Explorer: Restored "Apply Mica" functionality on OS builds 22621+. (f62c532) +* Localization: Officially added Japanese translations. (Thanks @creeper-0910, @reindex-ot, and @Rukoto!) +* GUI: Decoupled the Properties window into `ep_gui.dll` from the main DLL in order to reduce the main DLL size and to allow scalable localization. (f6f6d89, 639d7aa) + * `rundll32 C:\Windows\dxgi.dll,ZZGUI` will continue to work as before. + +#### ⚠️ Important notice for translators ⚠️ + +In this update, most if not all user-facing parts of ExplorerPatcher have been made localizable. + +* The English texts have been put together into [here](https://github.com/valinet/ExplorerPatcher/tree/master/ep_gui/resources/lang) and [here](https://github.com/valinet/ExplorerPatcher/tree/master/ep_setup/resources/lang). +* Non-English texts have been designed to be put into [this separate repository](https://github.com/valinet/ExplorerPatcher-L10N). Feel free to make a PR there if you want to contribute to translations. +* Some texts have been updated to be more concise and accurate, so for existing translation fork maintainers, please double check the translations before making a PR to the said repository. +* Also for translation fork maintainers, a large number of conflicts will happen if you decide to continue merging changes from the main repository. +* Please let us know through Issues if there are still user-facing parts of ExplorerPatcher that are not localizable. + +We apologize for the additional work that this change might cause. We hope that this one-time change will make it easier for translators to localize ExplorerPatcher and also easier for both translators and users to keep ExplorerPatcher up to date. + ## 22621.2428.59 Tested on OS builds 22000.2416, 22621.2428, 23555.1000, and 23560.1000. diff --git a/ExplorerPatcher-L10N b/ExplorerPatcher-L10N index 414761f62..bbe8bbda4 160000 --- a/ExplorerPatcher-L10N +++ b/ExplorerPatcher-L10N @@ -1 +1 @@ -Subproject commit 414761f62e8bc71f941a2e970432fff682d534eb +Subproject commit bbe8bbda4e6c31ef5866439c57c09067ad0ba3be diff --git a/ep_gui/resources/lang/ep_gui.en-US.rc b/ep_gui/resources/lang/ep_gui.en-US.rc index f25310766..d115e80a0 100644 --- a/ep_gui/resources/lang/ep_gui.en-US.rc +++ b/ep_gui/resources/lang/ep_gui.en-US.rc @@ -421,7 +421,7 @@ BEGIN IDS_ABOUT_OS "Running on %s, OS Build %d.%d." IDS_ABOUT_GITHUB "Visit project GitHub" IDS_ABOUT_WEBSITE "Visit web site" - IDS_ABOUT_DONATE "Donate (using PayPal)" + IDS_ABOUT_DONATE "Donate" IDS_ABOUT_FAQ "Frequently Asked Questions" IDS_ABOUT_SETTINGS "Learn more managing these settings" IDS_ABOUT_IMPORT "Import settings" diff --git a/version.h b/version.h index 9d708d784..e6cd2b23a 100644 --- a/version.h +++ b/version.h @@ -1,6 +1,6 @@ #define VER_MAJOR 22621 -#define VER_MINOR 2428 -#define VER_BUILD_HI 59 +#define VER_MINOR 2506 +#define VER_BUILD_HI 60 #define VER_BUILD_LO 1 #define VER_FLAGS VS_FF_PRERELEASE From c5bb636f1e6026d4e377776fa63c77441b7cccda Mon Sep 17 00:00:00 2001 From: Amrsatrio Date: Sun, 12 Nov 2023 17:24:30 +0700 Subject: [PATCH 11/12] All: Updated donation links, with kind permission from @valinet --- ExplorerPatcher-L10N | 2 +- FUNDING.yml | 1 + README.md | 6 +++++- ep_gui/resources/settings.reg | 2 +- ep_gui/resources/settings10.reg | 2 +- 5 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ExplorerPatcher-L10N b/ExplorerPatcher-L10N index bbe8bbda4..3895993c1 160000 --- a/ExplorerPatcher-L10N +++ b/ExplorerPatcher-L10N @@ -1 +1 @@ -Subproject commit bbe8bbda4e6c31ef5866439c57c09067ad0ba3be +Subproject commit 3895993c18effe2f10f101aa2139f6ef2abfc9bc diff --git a/FUNDING.yml b/FUNDING.yml index 5b1dd3b25..d775556fc 100644 --- a/FUNDING.yml +++ b/FUNDING.yml @@ -1 +1,2 @@ custom: ['https://www.paypal.com/donate?business=valentingabrielradu%40gmail.com&no_recurring=0&item_name=ExplorerPatcher'] +ko_fi: 'amrsatrio' diff --git a/README.md b/README.md index 36d42b5e4..d05be1914 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,10 @@ This project aims to enhance the working environment on Windows. -PayPal donations: [here](https://www.paypal.com/donate?business=valentingabrielradu%40gmail.com&no_recurring=0&item_name=ExplorerPatcher¤cy_code=EUR) or using e-mail address valentingabrielradu@gmail.com +## Donate + +If you find this project essential to your daily life, please consider donating to support the development through the +[Sponsor](#sponsor-button) button at the top of this page, so that we can continue to keep supporting newer Windows +builds. [Read more](https://github.com/valinet/ExplorerPatcher/wiki) diff --git a/ep_gui/resources/settings.reg b/ep_gui/resources/settings.reg index 18d71a81d..93e154b55 100644 --- a/ep_gui/resources/settings.reg +++ b/ep_gui/resources/settings.reg @@ -761,7 +761,7 @@ ;y %R:2007% (https://www.valinet.ro) 🡕 ;https://www.valinet.ro ;y %R:2009% 🡕 -;https://www.paypal.com/donate?business=valentingabrielradu%40gmail.com&no_recurring=0&item_name=ExplorerPatcher¤cy_code=EUR +;https://github.com/valinet/ExplorerPatcher#donate ;y %R:2010% 🡕 ;https://github.com/valinet/ExplorerPatcher/wiki/Frequently-asked-questions ;y %R:2011% 🡕 diff --git a/ep_gui/resources/settings10.reg b/ep_gui/resources/settings10.reg index 68eb3d929..f302d875d 100644 --- a/ep_gui/resources/settings10.reg +++ b/ep_gui/resources/settings10.reg @@ -584,7 +584,7 @@ ;y %R:2007% (https://www.valinet.ro) 🡕 ;https://www.valinet.ro ;y %R:2009% 🡕 -;https://www.paypal.com/donate?business=valentingabrielradu%40gmail.com&no_recurring=0&item_name=ExplorerPatcher¤cy_code=EUR +;https://github.com/valinet/ExplorerPatcher#donate ;y %R:2010% 🡕 ;https://github.com/valinet/ExplorerPatcher/wiki/Frequently-asked-questions ;y %R:2011% 🡕 From 3b902d0ae7205252dd9981856765d0648331a930 Mon Sep 17 00:00:00 2001 From: Amrsatrio Date: Mon, 13 Nov 2023 00:36:56 +0700 Subject: [PATCH 12/12] File Explorer: Fixed UB caused by wrong ShouldAppsUseDarkMode signature (#2429, #2431) --- CHANGELOG.md | 4 +++- ExplorerPatcher-L10N | 2 +- ExplorerPatcher/dllmain.c | 6 +++--- ExplorerPatcher/utility.h | 11 +++++------ ep_gui/GUI.c | 1 - 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c81869bce..31e0b2519 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,7 +14,9 @@ Tested on OS builds 22000.2416, 22621.2361, 22621.2506, and 23585.1001. * Changing the taskbar alignment requires restarting `explorer.exe` in order to take effect. * File Explorer: Added option to disable the modern navigation bar of Moment 4. (2dc1340) * File Explorer: Restored "Apply Mica" functionality on OS builds 22621+. (f62c532) -* Localization: Officially added Japanese translations. (Thanks @creeper-0910, @reindex-ot, and @Rukoto!) +* Localization: Officially added translations for the following languages: + * Chinese, Simplified (Thanks @zetaloop!) + * Japanese (Thanks @creeper-0910, @reindex-ot, and @Rukoto!) * GUI: Decoupled the Properties window into `ep_gui.dll` from the main DLL in order to reduce the main DLL size and to allow scalable localization. (f6f6d89, 639d7aa) * `rundll32 C:\Windows\dxgi.dll,ZZGUI` will continue to work as before. diff --git a/ExplorerPatcher-L10N b/ExplorerPatcher-L10N index 3895993c1..b358f5caf 160000 --- a/ExplorerPatcher-L10N +++ b/ExplorerPatcher-L10N @@ -1 +1 @@ -Subproject commit 3895993c18effe2f10f101aa2139f6ef2abfc9bc +Subproject commit b358f5caf8bae8314d2a5c1611eae31c48a07c39 diff --git a/ExplorerPatcher/dllmain.c b/ExplorerPatcher/dllmain.c index 0a543c7ae..d252faad7 100644 --- a/ExplorerPatcher/dllmain.c +++ b/ExplorerPatcher/dllmain.c @@ -3906,7 +3906,7 @@ HWND WINAPI explorerframe_SHCreateWorkerWindowHook( { SetWindowSubclass(hWndParent, HideExplorerSearchBarSubClass, HideExplorerSearchBarSubClass, 0); } - if (bIsExplorerProcess && dwFileExplorerCommandUI != 0 && IsWindows11Version22H2OrHigher()) + if (bIsExplorerProcess && (dwFileExplorerCommandUI == 1 || dwFileExplorerCommandUI == 2 || dwFileExplorerCommandUI == 3) && IsWindows11Version22H2OrHigher()) { // Fix initial title bar style after disabling TIFE // If we don't do this, it will only fix itself once the user changes the system color scheme or toggling transparency effects @@ -3917,8 +3917,8 @@ HWND WINAPI explorerframe_SHCreateWorkerWindowHook( } if (ShouldAppsUseDarkMode) { - BOOL value = ShouldAppsUseDarkMode(); - DwmSetWindowAttribute(hWndParent, DWMWA_USE_IMMERSIVE_DARK_MODE, &value, sizeof(BOOL)); + BOOL bDarkMode = ShouldAppsUseDarkMode() && !IsHighContrast(); + DwmSetWindowAttribute(hWndParent, DWMWA_USE_IMMERSIVE_DARK_MODE, &bDarkMode, sizeof(BOOL)); } } } diff --git a/ExplorerPatcher/utility.h b/ExplorerPatcher/utility.h index 9bb815356..d77afbeae 100644 --- a/ExplorerPatcher/utility.h +++ b/ExplorerPatcher/utility.h @@ -24,6 +24,7 @@ #include #include #include +#include #include "def.h" @@ -367,18 +368,16 @@ BOOL(WINAPI* SetWindowBand)(HWND hWnd, HWND hwndInsertAfter, DWORD dwBand); INT64(*SetWindowCompositionAttribute)(HWND, void*); -static void(*SetPreferredAppMode)(INT64 bAllowDark); +static void(*SetPreferredAppMode)(bool bAllowDark); -static void(*AllowDarkModeForWindow)(HWND hWnd, INT64 bAllowDark); +static void(*AllowDarkModeForWindow)(HWND hWnd, bool bAllowDark); -static BOOL(*ShouldAppsUseDarkMode)(); +static bool(*ShouldAppsUseDarkMode)(); -static BOOL(*ShouldSystemUseDarkMode)(); +static bool(*ShouldSystemUseDarkMode)(); static void(*GetThemeName)(void*, void*, void*); -static BOOL AppsShouldUseDarkMode() { return TRUE; } - void* ReadFromFile(wchar_t* wszFileName, DWORD* dwSize); int ComputeFileHash(LPCWSTR filename, LPSTR hash, DWORD dwHash); diff --git a/ep_gui/GUI.c b/ep_gui/GUI.c index 9e5eedb9c..4e3736561 100644 --- a/ep_gui/GUI.c +++ b/ep_gui/GUI.c @@ -11,7 +11,6 @@ void* GUI_FileMapping = NULL; DWORD GUI_FileSize = 0; BOOL g_darkModeEnabled = FALSE; static void(*RefreshImmersiveColorPolicyState)() = NULL; -// static BOOL(*ShouldAppsUseDarkMode)() = nullptr; // Already defined in utility.h DWORD dwTaskbarPosition = 3; BOOL gui_bOldTaskbar = TRUE;