FIX: register source without runas

Change-Id: I7307941878471ab0dc195e467a048ad31a8a7656
Jira: STUDIO-4854
(cherry picked from commit 2a9e6f74f5b2d0ffb12ead2a072959bc075dc455)
This commit is contained in:
chunmao.guo 2023-10-20 18:56:21 +08:00 committed by Lane.Wei
parent 6dcfccdeab
commit aced77886f
1 changed files with 3 additions and 3 deletions

View File

@ -91,7 +91,7 @@ void wxMediaCtrl2::Load(wxURI url)
[dll_path] {
int res = wxMessageBox(_L("BambuSource has not correctly been registered for media playing! Press Yes to re-register it."), _L("Error"), wxYES_NO | wxICON_ERROR);
if (res == wxYES) {
SHELLEXECUTEINFO info{sizeof(info), 0, NULL, L"runas", L"regsvr32", dll_path.wstring().c_str(), SW_HIDE };
SHELLEXECUTEINFO info{sizeof(info), 0, NULL, L"open", L"regsvr32", dll_path.wstring().c_str(), SW_HIDE };
::ShellExecuteEx(&info);
}
});
@ -110,9 +110,9 @@ void wxMediaCtrl2::Load(wxURI url)
if (path != dll_path) {
static bool notified = false;
if (!notified) CallAfter([dll_path] {
int res = wxMessageBox(_L("Using a BambuSource from a different install, video play may not work correctly! Press Yes to re-register it."), _L("Warning"), wxYES_NO | wxICON_WARNING);
int res = wxMessageBox(_L("Using a BambuSource from a different install, video play may not work correctly! Press Yes to fix it."), _L("Warning"), wxYES_NO | wxICON_WARNING);
if (res == wxYES) {
SHELLEXECUTEINFO info{sizeof(info), 0, NULL, L"runas", L"regsvr32", dll_path.wstring().c_str(), SW_HIDE};
SHELLEXECUTEINFO info{sizeof(info), 0, NULL, L"open", L"regsvr32", dll_path.wstring().c_str(), SW_HIDE};
::ShellExecuteEx(&info);
}
});