I have my installer set to run the uninstaller in silent mode first, if available, and that works fine. However, I have found a case where a problem can result. If a component is in use when you go to install an update, it seems that uninstaller in silent mode does not set _NeedsReboot or anything that I can identify to indicate that it has set a file for deletion on restart. After the uninstall completes and the installer goes to install new files, it will pop a warning that the file is in use and you can close some other app and click retry and then it works. However, that file has already been marked for deletion on reboot before this point, so after the installation is complete, when you do reboot, it actually deletes a file that is needed and now the application does not run.
I have been trying to find a way for the silent uninstaller to inform the parent installer that a reboot is needed so it can inform the user and abort, but _NeedsReboot is not set. Should it be? I can see a potential problem here as it seems to always mark a few folders for removal on reboot. They don't get deleted because they are not empty when the system reboots, but if this also set the _NeedsReboot flag, then you would always need to restart.
Is there some way to intercept the prompt for file in use that you don't see when you are running in silent mode? Is there a way to make a fake silent mode that doesn't pop warnings for every shared file or display anything except file in use warnings?
Is there some other way to deal with this that I'm just missing entirely?
Thanks
Scott
I have been trying to find a way for the silent uninstaller to inform the parent installer that a reboot is needed so it can inform the user and abort, but _NeedsReboot is not set. Should it be? I can see a potential problem here as it seems to always mark a few folders for removal on reboot. They don't get deleted because they are not empty when the system reboots, but if this also set the _NeedsReboot flag, then you would always need to restart.
Is there some way to intercept the prompt for file in use that you don't see when you are running in silent mode? Is there a way to make a fake silent mode that doesn't pop warnings for every shared file or display anything except file in use warnings?
Is there some other way to deal with this that I'm just missing entirely?
Thanks
Scott
Comment