Windows service in itself does not support any UI.
The best you can do is catch the
stop event[
^] of the service and then launch an exe that will display a message box.
However if the machine is already shutting down, the message box will be closed by the operating system anyway.
A better approach would be to handle
WM_QUERYENDSESSION
or
WM_ENDSESSION
on your own as described
here[
^]. You can do