1
0
mirror of https://github.com/valinet/ExplorerPatcher.git synced 2024-11-23 23:21:08 +01:00

GUI: Added "Uninstall" section containing a button to launch the uninstaller.

People asked "how to uninstall" so I think this might help.
This commit is contained in:
Amrsatrio 2024-02-14 04:39:14 +07:00
parent 0157ecc330
commit 0c5021b376
5 changed files with 4204 additions and 4172 deletions

View File

@ -2165,6 +2165,22 @@ static BOOL GUI_Build(HDC hDC, HWND hwnd, POINT pt)
}
}
}
else if (!strncmp(line + 1, "uninstall", 6))
{
wchar_t uninstallLink[MAX_PATH];
ZeroMemory(uninstallLink, sizeof(uninstallLink));
SHGetFolderPathW(NULL, SPECIAL_FOLDER, NULL, SHGFP_TYPE_CURRENT, uninstallLink);
wcscat_s(uninstallLink, MAX_PATH, _T(APP_RELATIVE_PATH) L"\\" _T(SETUP_UTILITY_NAME));
SHELLEXECUTEINFOW sei;
ZeroMemory(&sei, sizeof(SHELLEXECUTEINFOW));
sei.cbSize = sizeof(sei);
sei.hwnd = hwnd;
sei.lpFile = uninstallLink;
sei.nShow = SW_NORMAL;
sei.lpParameters = L"/uninstall";
ShellExecuteExW(&sei);
}
else if (!strncmp(line + 1, "update_weather", 14))
{
PostMessageW(FindWindowW(_T(EPW_WEATHER_CLASSNAME), NULL), EP_WEATHER_WM_FETCH_DATA, 0, 0);

View File

@ -386,4 +386,7 @@
#define IDS_ABOUT_EXPORT_SUCCESS 2014
#define IDS_ABOUT_RESET 2015
#define IDS_FOOTER_RESTART 2101
#define IDS_UNINSTALL 2101
#define IDS_UNINSTALL_UNINSTALL 2102
#define IDS_FOOTER_RESTART 2201

View File

@ -430,5 +430,8 @@ BEGIN
IDS_ABOUT_EXPORT_SUCCESS "Settings have been exported successfully."
IDS_ABOUT_RESET "Restore default settings"
IDS_UNINSTALL "Uninstall"
IDS_UNINSTALL_UNINSTALL "Uninstall ExplorerPatcher"
IDS_FOOTER_RESTART "Restart File Explorer"
END

View File

@ -783,7 +783,12 @@
;reset
;T %R:2101%
;u %R:2102%
;uninstall
;f
;u %R:2101% (*)
;u %R:2201% (*)
;restart

View File

@ -603,7 +603,12 @@
;reset
;T %R:2101%
;u %R:2102%
;uninstall
;f
;u %R:2101% (*)
;u %R:2201% (*)
;restart