MaintenanceTool uses a temporary .vbs script to do an update of itself on Windows.
This sometimes causes issues with Virus Scanners (see e.g.
QTIFW-1113, mailing list , forum). It is also problematic in cases where the cscript host is disabled, see QTIFW-956.
An alternative approach that Julien Cugnière suggests on firstname.lastname@example.org is:
[...] In windows a running executable cannot replace itself, but it can rename itself. The way I've done it in the past is:
- The running executable renames itself.
- It then creates the new executable with the correct name.
- Just before returning from main, it starts the new executable (there
is a short window of time where both the old and new one can be
running, but it doesn't matter if the old one is not using any
resources any more ; if need be, the new one can be given a flag to
wait for the old one to exit).
I find it simpler, and much less likely to trigger an antivirus than a
This indeed sounds much simpler, though it needs to be understood if this approach also works in case of elevated installation (where MaintenanceTool "spawns" itself as an elevated process). How about giving it a try?