mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-09-21 13:15:57 +00:00
Try to de-elevate after applying an update to not run UI as admin
This commit is contained in:
@@ -361,6 +361,10 @@ int main(int argc, char *argv[])
|
||||
hideOption(updateFailed);
|
||||
parser.addOption(updateFailed);
|
||||
|
||||
QCommandLineOption updateDoneAdmin(lit("updatedone_admin"));
|
||||
hideOption(updateDoneAdmin);
|
||||
parser.addOption(updateDoneAdmin);
|
||||
|
||||
QCommandLineOption updateDone(lit("updatedone"));
|
||||
hideOption(updateDone);
|
||||
parser.addOption(updateDone);
|
||||
@@ -413,11 +417,22 @@ int main(int argc, char *argv[])
|
||||
|
||||
if(parser.isSet(updateDone))
|
||||
{
|
||||
qInfo() << "Finishing update as user";
|
||||
updateApplied = true;
|
||||
|
||||
// the renderdoccmd updater that runs us is from the old version, so older versions might be
|
||||
// running us as admin expecting the version number to be updated.
|
||||
// if we're not running as admin, this will immediately exit
|
||||
RENDERDOC_UpdateInstalledVersionNumber();
|
||||
}
|
||||
|
||||
if(parser.isSet(updateDoneAdmin))
|
||||
{
|
||||
qInfo() << "Finishing update as admin";
|
||||
RENDERDOC_UpdateInstalledVersionNumber();
|
||||
return 0;
|
||||
}
|
||||
|
||||
QString remoteHost;
|
||||
uint remoteIdent = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user