Skip to content

Commit

Permalink
installer: ensure old ime/dll files deleted by running `WeaselSetup.e…
Browse files Browse the repository at this point in the history
…xe /u` before installing.
  • Loading branch information
fxliang committed Jun 11, 2024
1 parent 8dd0898 commit 09f1769
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
7 changes: 0 additions & 7 deletions WeaselSetup/imesetup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -234,12 +234,6 @@ int uninstall_ime_file(const std::wstring& ext,
if (is_wow64()) {
retval += func(imePath, false, true, false, false, silent);
PVOID OldValue = NULL;
// PW64DW64FR fnWow64DisableWow64FsRedirection =
// (PW64DW64FR)GetProcAddress(GetModuleHandle(_T("kernel32.dll")),
// "Wow64DisableWow64FsRedirection"); PW64RW64FR
// fnWow64RevertWow64FsRedirection =
// (PW64RW64FR)GetProcAddress(GetModuleHandle(_T("kernel32.dll")),
// "Wow64RevertWow64FsRedirection");
if (Wow64DisableWow64FsRedirection(&OldValue) == FALSE) {
MSG_NOT_SILENT_BY_IDS(silent, IDS_STR_ERRCANCELFSREDIRECT,
IDS_STR_UNINSTALL_FAILED, MB_ICONERROR | MB_OK);
Expand Down Expand Up @@ -676,7 +670,6 @@ int uninstall(bool silent) {
HKEY hKey;
LSTATUS ret = RegOpenKey(HKEY_CURRENT_USER, KEY, &hKey);
if (ret == ERROR_SUCCESS) {
WCHAR value[MAX_PATH];
DWORD type = 0;
DWORD data = 0;
DWORD len = sizeof(data);
Expand Down
2 changes: 2 additions & 0 deletions output/install.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,8 @@ program_files:
IfErrors +2 0
StrCpy $R2 "/t"

; ensure old file deleted, avoid IPC issue
ExecWait '"$INSTDIR\WeaselSetup.exe" /u'
ExecWait '"$INSTDIR\WeaselSetup.exe" $R2'

; Write the uninstall keys for Windows
Expand Down

0 comments on commit 09f1769

Please sign in to comment.