Optimized code

This commit is contained in:
aiamnezia 2024-12-12 06:54:10 +04:00
parent bac71ed3e7
commit 2029c108e5

View file

@ -389,13 +389,10 @@ int IpcServer::installApp(const QString &path)
#ifdef Q_OS_WINDOWS
QProcess process;
logger.info() << "Launching installer with elevated privileges...";
process.start("powershell.exe",
QStringList() << "Start-Process" << path << "-Verb"
<< "RunAs"
<< "-Wait");
process.start(path);
process.waitForFinished();
logger.info() << "Installer stdout:" << process.readAllStandardOutput();
logger.info() << "Installer stderr:" << process.readAllStandardError();
process.waitForFinished();
if (process.exitCode() != 0) {
logger.error() << "Installation error:" << process.readAllStandardError();