
lmiles1.5524917508050645E12 asked a question.
Wait till spooler is Started/Stopped
Hi,
I'm creating a Basic MSI project, on uninstall I need to delete some installed dll's, however to do this I need to start/stop the spooler, I can do this in install script using;
ServiceStopService("Spooler");
ServiceStartService("Spooler", "");
At present I have added a Delay(5); after each command before attempting to remove the files, however it can take longer or even be faster for the spooler to start on stop dependent on each users system, is there a way for me to check that the spooler has in fact been stopped or started before continuing execution of the script?
Many thanks in advance
You might want to put an overall timeout on this though in case the service refuses to shutdown for some reason.