dokany
dokany copied to clipboard
Installer: Upgrade existing installation without (or with delayed) restart
This is a feature request related to #321.
I understand, that MSI bundles are "too stupid" to check for existing installations or even remove or upgrade them. So we need to add this check to our installer manually.
But at the moment, even with some scripting we're unable to upgrade the driver due to the fact that a restart is required between deinstallation of the old version and installation of the new version. We can only display instructions to the end-user, but we have to asume that he*she doesn't know how to do all this.
Is there any chance that deinstallation will not force the user to restart the system? I'd like a downstream installer to behave like this:
- check if old dokany version is installed
- uninstall old dokany version (without restart!)
- check if latest dokany version is installed
- install dokany dependencies (related to #322)
- install latest dokany version
- install downstream software
- (if required) restart windows
Quoting MS article "Avoiding System Restarts during Device Installations and Driver Updates":
If you can’t stop the driver, rename the existing file, copy the new file into place, and set up the existing file to be deleted in the future (for example, using MoveFileEx with the MOVEFILE_DELAY_UNTIL_REBOOT flag). In order to start using the new version of the driver, the system will need to be restarted.
I can imagine the support requests from this:
"It worked until I rebooted, but I didn't change anything."
There would need to be instrumentation to explain the current driver version and the version that it needed to be updated to, and that it wouldn't update until a reboot. It would also need to be logged somewhere in case the user needed to roll back.
Yes of course it should not silently do such upgrades.
But at the moment we are in exactly this situation that we're bombarded with support requests because the Dokany API we're using is not downwards compatible to the outdated driver installed on our end-users PCs.
If there are changes required in the installer part of the software, I'm glad to help and test. Unfortunately I'm not well enough equipped to tackle system driver changes without help though.