I got even deeper into the problem. It turns out that if the "Default for "Run in terminal"" option is enabled (Edit - Preferences - Build & Run), then this error will occur. Everything returns to normal if you disable this option.
Instead of closing the console window you could compile without the /CONSOLE flag and then use AttachConsole in the case of the non-gui application.
We are actually using a two-application solution which is a little different than a launcher script. This solution is taken from Microsoft itself. Visual Studio comes as a devenv.exe and a devenv.com. The .exe is the GUI application and the .com is the command line application. On the command line (when using the application name without the file ending) it will start the .com application. In our own application we added command line parameters to have each call the other one (using QProcess) to switch between GUI/non-GUI.
Thanks, indeed it aligns better with the new design.
I will try to use loadFromModule API from now on
According to this will improve compilation time when changing qml files, that is something I was looking for.
@Paul-Colby
As you say, ApplicationsLocation returning .../Start Menu/Programs seems a bit "odd". It is "surprising" that Qt does not offer anything to return Program Files etc. under Windows. Yes, these are very Windows-specific, and Qt is largely (but not totally) platform-agnostic, but still I would have guessed Qt would offer something for this. But it is what it is, and code can use environment variables or native Windows calls to get the desired path.
@supratik123
Don't forget to verify whether you are looking for Program Files or Program Files (x86), they are not the same place!
I think I found the issue - it was because I the app uses a tray icon and WM_CLOSE doesn't fully close the app. This appears to play badly with the Windows restart manager. The solution was to use a custom script to terminate the app during update / removal.
@AlexMax
The issues is marked fixed in 6.3 and 6.4, so it it still persists in 6.5, that would probably warrant a new issue, linking to the old one. Or is it captured by linked and still-open https://bugreports.qt.io/browse/QTBUG-99602?
I'm hoping for an answer on this. Here is a screenshot of the QT Maintenance Tool.
Shouldn't I see a way to install the QT Multimedia component here? I have a red arrow where I would have assumed I'd see it (I've seen examples on the web with screenshots showing it.) I have 6.3.1 installed.