I always shut down IIS, stop smartermail service, uninstall, accept the prompt that says a reboot is required to release locked files. Reboot. Then reinstall. This is for our big production servers.
For our gateway servers that have no users, I don’t shut down IIS or stop smartermail. Straight uninstall, reboot, reinstall.
I don’t remember why I do this instead of just running the installer over the existing one, I think I ran into problems in the past. Maybe I should try it again?
The only thing you have to make sure is that mailservice.exe is not running anymore before upgrading.
The installer itself stop the service as part of the installation/upgrade procfess, but for highly active server the mailservice.exe used to take some minutes to be really fully stopped and disappear from running processes, even that the windows service manager report the service as stopped.
I had verry shitty cases where the mailservice.exe was still not completly stopped and the installer finished the upgrade and started the service again, which resulted in two mailservices.exe running at the same time, causing ports binding errors and file corruptions as two processes were accessing/modifying files at the same time (json files corruption etc).
The situation is better since around a year I guess, and I think there is now a check that prevents two instances of the executable to run, but it still sometimes takes 1 minute to fully stop on our "big" server.
So my upgrade routine is quite simple:
1) Stop smartermail via the service manager
2) Monitor the mailservice.exe proccess with task manager and wait that it disappear.
3) Start Upgrade
4) Done
It never failed an upgrade, well unless when there was an issue with the new build though.
Stopping IIS website, application pool (not used anymore I think as now IIS is only a reverse proxy to SM's own web service), restart server are quite never required.