summaryrefslogtreecommitdiff
path: root/indra/newview/llvelopack.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llvelopack.cpp')
-rw-r--r--indra/newview/llvelopack.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/indra/newview/llvelopack.cpp b/indra/newview/llvelopack.cpp
index 774eb811dc..2f91951016 100644
--- a/indra/newview/llvelopack.cpp
+++ b/indra/newview/llvelopack.cpp
@@ -494,7 +494,9 @@ static void register_uninstall_info(const std::wstring& install_dir,
REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL, &hkey, NULL) == ERROR_SUCCESS)
{
std::wstring exe_path = install_dir + L"\\" + get_viewer_exe_name();
- std::wstring uninstall_cmd = L"\"" + install_dir + L"\\Update.exe\" --uninstall";
+ // Update.exe lives one level above the current\ directory where the viewer exe runs
+ std::filesystem::path update_exe = std::filesystem::path(install_dir).parent_path() / L"Update.exe";
+ std::wstring uninstall_cmd = L"\"" + update_exe.wstring() + L"\" --uninstall";
RegSetValueExW(hkey, L"DisplayName", 0, REG_SZ,
(BYTE*)app_name.c_str(), (DWORD)((app_name.size() + 1) * sizeof(wchar_t)));