Mercurial > trustbridge
diff ui/installwrapper.cpp @ 524:a097dd86cb4d
merged.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Tue, 29 Apr 2014 15:26:43 +0200 |
parents | cef732072774 |
children | a9a57dc1eb2f |
line wrap: on
line diff
--- a/ui/installwrapper.cpp Tue Apr 29 15:26:02 2014 +0200 +++ b/ui/installwrapper.cpp Tue Apr 29 15:26:43 2014 +0200 @@ -15,6 +15,7 @@ #include <QDebug> #include "logging.h" +#include "util.h" #define INSTALL_TIMEOUT 3600000 /* Wait up to an hour */ @@ -95,7 +96,11 @@ shExecInfo.cbSize = sizeof(SHELLEXECUTEINFOW); shExecInfo.fMask = SEE_MASK_NOCLOSEPROCESS; - shExecInfo.lpVerb = L"runas"; + if (!is_admin()) { + shExecInfo.lpVerb = L"open"; + } else { + shExecInfo.lpVerb = L"runas"; + } shExecInfo.lpFile = reinterpret_cast<LPCWSTR> (cinstFileName.utf16()); shExecInfo.lpParameters = reinterpret_cast<LPCWSTR> (parameters.utf16());