I have read this question. I have same issue, but I don\'t understand the answer from lubos hasko. How exactly can I do it? Can you someone post me full walkthrough?
System.Environment.UserInteractive property tells you that
whether a Windows process or a service like IIS that runs without a user interface.
If this property is false, do not display modal dialogs or message boxes because there is no graphical user interface for the user to interact with. Source
Check this article as well.