oleg-shilo / wixsharp

Framework for building a complete MSI or WiX source code by using script files written with C# syntax.
MIT License
1.12k stars 175 forks source link

Asking for reboot after unistalling #1540

Closed artemishenkov closed 3 months ago

artemishenkov commented 6 months ago

Hi, I have written an installer that installs a Windows Service and when I uninstall it I get this reboot message image But Windows Service and other folders are uninstalled successfully without any reboot is there any chance I can suppress this message? I would appreciate any help. Thank you.

oleg-shilo commented 6 months ago

I do not know what system component is poping up this message. It's not WixSharp. I am not even sure it is an MSI. It might be even the Windows service manager.

Sorry, I do not know any way to suppress it.

Torchok19081986 commented 6 months ago

Hallo, AFAIK if windows service uninsatll service, you have to reboot system. I think, some handle or registry key are set for specific windows service and will be update AFTER reboot of system. "Normally" work of windows. There is one strange source from Stackoverlow, that means, it can be done.

https://stackoverflow.com/questions/299604/how-to-uninstall-a-windows-service-and-delete-its-files-without-rebooting Never tried , there is no particular reasons, why reboot of system may not happens.

oleg-shilo commented 6 months ago

Yes indeed. The uninstalling services only become complete after reboot. Between uninstalling and rebooting the service is kinda in the "marked for deletion state" (kinda undead). You cannot start it and you cannot delete it from the registry. Only reboot transfers it to the final "deleted" state.

Thus while suspending the message box is theoretically possible, it does not really brings significant value.