[wix-users] Long check for files in use during uninstall
Dzmitry_Razhanski at epam.com
Tue May 29 03:50:22 PDT 2018
I have met the problem with long execution of the InstallValidate action during uninstallation.
When I launch msiexec from command line window which has already administrative rights, InstallValidate action takes more than a minute and put into the log messages about files in use. Yes, two applications usually are launched when uninstallation starts, but they would be stopped during it.
When I uninstall the same package without administrative rights, it asks about them, but InstallValidate does not take so much time and does not tell about files in use.
In the article about InstallValidate(https://msdn.microsoft.com/en-us/library/windows/desktop/aa369546(v=vs.85).aspx)
I found the following:
"Files marked read-only in a read-only location are never considered in use by the installer."
So the all files are installed as read-only. And probably it helps to avoid files in use issue during usual uninstallation. But the uninstallation with administrative rights still cause the files in use issue.
So the question is how I could prevent the files in use check during uninstallation? And why there is the such difference in behavior when launching with administration rights initially? Probably the InstallValidate action could be skipped for uninstallation?
More information about the wix-users