Unsolved QIF --silentUpdate not doing updates outside of Qt Creator
-
Hello, trying to update application packaged with Qt installer framework but silentupdate doesn't want to work when I am launching the application normally:
QString updaterPath = QDir::toNativeSeparators(workDir.absoluteFilePath("RezEco-dezinstalare.exe")); updaterPath = "\"" + updaterPath + "\""; QProcess process; process.start(updaterPath, QStringList() << "--silentUpdate"); process.waitForFinished();
Doesn't return any error, but doesn't the update either from the application. Only when I try and run the application from Qt Creator the updater works.
I set updaterPath to the exact path of the executable where the application is installed.
process.startDetached(updaterPath, QStringList() << "--silentUpdate") has the same behaviour.
Any ideeas?
Platform Windows 10, x64, Qt 5.12.6 with MSVC2017 x32 compiler. -
I added verbose to the updater and get the following:
[54] Unable to update components. Please stop these processes: ("C:/Users/Verban Adrian/RezEco/QtWebEngineProcess.exe", "C:/Users/Verban Adrian/RezEco/RezEco.exe") and try again.
Now I understand why it works from inside Qt Creator, since it's not the same binary which get's updated. But on the other hand, using the updater UI tool updates the application even if it's opened.
So, then, how do I use the option --silentUpdate in order to update an application?