Sunday, August 23, 2009

Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation

I am writing a Windows Service that pops up a message box for debugging purposes. This does not work because services are not configured automatically to interact with the desktop.

All you need to do to fix this is:
1. Control Panel -> Administrative Tools -> Services
2. Right click on your service -> Properties -> Logon tab
3. Then make it look like this:

No comments:

Post a Comment