Show a message box from a Windows Service

You can display a message from a service with "WTSSendMessage(...)" function (which is available since Windows Vista and Windows Server 2008), here is a good article: http://msdn.microsoft.com/en-us/library/ms683502(VS.85).aspx


No, you cannot show a message box from a service. If you want to report errors, the standard way to do this is with the event log.

For more "advanced" kinds of UI (not just error reporting), the way this is typically done is via a regular windows application that you put in the user's Startup folder (or the Run key in the registry) and that talks to the service via some kind of IPC mechanism (.NET remoting, WCF, regular sockets, named pipes, etc).