Optimized code
This commit is contained in:
parent
bac71ed3e7
commit
2029c108e5
1 changed files with 2 additions and 5 deletions
|
|
@ -389,13 +389,10 @@ int IpcServer::installApp(const QString &path)
|
||||||
#ifdef Q_OS_WINDOWS
|
#ifdef Q_OS_WINDOWS
|
||||||
QProcess process;
|
QProcess process;
|
||||||
logger.info() << "Launching installer with elevated privileges...";
|
logger.info() << "Launching installer with elevated privileges...";
|
||||||
process.start("powershell.exe",
|
process.start(path);
|
||||||
QStringList() << "Start-Process" << path << "-Verb"
|
process.waitForFinished();
|
||||||
<< "RunAs"
|
|
||||||
<< "-Wait");
|
|
||||||
logger.info() << "Installer stdout:" << process.readAllStandardOutput();
|
logger.info() << "Installer stdout:" << process.readAllStandardOutput();
|
||||||
logger.info() << "Installer stderr:" << process.readAllStandardError();
|
logger.info() << "Installer stderr:" << process.readAllStandardError();
|
||||||
process.waitForFinished();
|
|
||||||
|
|
||||||
if (process.exitCode() != 0) {
|
if (process.exitCode() != 0) {
|
||||||
logger.error() << "Installation error:" << process.readAllStandardError();
|
logger.error() << "Installation error:" << process.readAllStandardError();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue