I’m using an MSI installer (built with the WiX ServiceInstall element) to deploy a Windows Service. The service installs correctly, and I start it manually in the Services.
When uninstalling the MSI through “Add or Remove Programs,” I encounter two scenarios:
1: Service not Running: If the service is not running, the MSI uninstalls cleanly (this works as expected).
2: Service running: If the service is running, the MSI still stops and service is removed automatically.
I want when the service is running it should show below default windows message box.

Code for the Service Installation:
new ServiceInstaller
{
Name = "IP.ServiceInstaller.exe",
DisplayName = "[IASSERVICENAME]",
Description = "This is a Service",
StartOn = null, //set it to null if you don't want service to start as during deployment
StopOn = SvcEvent.InstallUninstall,
RemoveOn = SvcEvent.Uninstall_Wait,
DelayedAutoStart = false,
ServiceSid = ServiceSid.none,
FirstFailureActionType = FailureActionType.restart,
SecondFailureActionType = FailureActionType.restart,
ThirdFailureActionType = FailureActionType.runCommand,
RestartServiceDelayInSeconds = 30,
ResetPeriodInDays = 1,
PreShutdownDelay = 1000 * 60 * 3,
Account = "[USERNAME]",
Password = "[PASSWORD]"
}),
What are the changes should be for the given code?