diff options
Diffstat (limited to 'windows/nsis-plugins/src/cleanup/cleanup.cpp')
| -rw-r--r-- | windows/nsis-plugins/src/cleanup/cleanup.cpp | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/windows/nsis-plugins/src/cleanup/cleanup.cpp b/windows/nsis-plugins/src/cleanup/cleanup.cpp index 528efb2f7a..ca943934a7 100644 --- a/windows/nsis-plugins/src/cleanup/cleanup.cpp +++ b/windows/nsis-plugins/src/cleanup/cleanup.cpp @@ -23,8 +23,8 @@ void __declspec(dllexport) NSISCALL RemoveLogsAndCache { cleaningops::RemoveLogsCacheCurrentUser, cleaningops::RemoveLogsCacheOtherUsers, - cleaningops::RemoveLogsServiceUser, cleaningops::RemoveCacheServiceUser, + cleaningops::RemoveLogsServiceUser, }; bool success = true; @@ -47,6 +47,36 @@ void __declspec(dllexport) NSISCALL RemoveLogsAndCache pushint(success ? NsisStatus::SUCCESS : NsisStatus::GENERAL_ERROR); } +void __declspec(dllexport) NSISCALL MigrateCache +( + HWND hwndParent, + int string_size, + LPTSTR variables, + stack_t** stacktop, + extra_parameters* extra, + ... +) +{ + EXDLL_INIT(); + + try + { + cleaningops::MigrateCacheServiceUser(); + pushstring(L""); + pushint(NsisStatus::SUCCESS); + } + catch (std::exception &err) + { + pushstring(common::string::ToWide(err.what()).c_str()); + pushint(NsisStatus::GENERAL_ERROR); + } + catch (...) + { + pushstring(L"Unspecified error"); + pushint(NsisStatus::GENERAL_ERROR); + } +} + void __declspec(dllexport) NSISCALL RemoveSettings ( HWND hwndParent, |
