QProcess::startDetached blocked by UAC (running an updater)

You can also use

QDesktopServices::openUrl(QUrl::fromLocalFile(path));

Might be surprising and counterintuitive, but it works and is more cross-platform


If you are not admin and you call CreateProcess() on a .exe with a "Vista" manifest (or no manifest, but a .exe that windows detects as an installer (This includes NSIS)) the call fails, you need to use ShellExecute[Ex](). ShellExecute will trigger UAC prompt if required...


This seems to be a Qt bug, see QTBUG-9761 , the correct workaround is to use ShellExecute with lpOperation set to runas.

Tags:

Process

Qt

Uac