View Full Version : Files in use by service during uninstall

10-14-2010, 06:12 PM
We install a service as part of our installation.
During the uninstall occasionally users will receive a message stating:

"The setup must update files or services that cannot by updated while the system is running. If you choose to continue, a reboot will be required to complete the setup."

The files are being held open by the service, but the service will get stopped before RemoveFiles. How can I convince the uninstall that it's totally fine that the files are open, don't warn the user, and continue on with the uninstall?

I've tried stopping the service, but don't have proper permissions during the immediate phase before InstallValidate to do so without throwing an additional UAC dialog, which is unwanted.