Allow service to interact with desktop - Windows Service to communicate with OPC Server
CreateService will report that error if the service type parameter is not set correctly:
If you specify either SERVICE_WIN32_OWN_PROCESS or
SERVICE_WIN32_SHARE_PROCESS, and the service is running in the context
of the LocalSystem account, you can also specify the following value:
SERVICE_INTERACTIVE_PROCESS
Alternative to Allow service to interact with desktop ?
If you are using Vista and later and you don't really need any interaction with the user, but have an interactive exe to execute, the Session 0 isolation feature should help alleviate some of the concerns about the 'bad practice' on having a service interact with the desktop (which in Session 0 has no physical console).
This Session 0 isolation would prevent unprivileged users from performing Shatter Attacks on your service as they get their interactive desktops in different sessions. Shatter attacks are the main reason why this 'interaction with desktop' was considered bad practice and if you are using Vista or later, it should be ok if you cannot avoid it (or will have to spend too much effort to do it).
So, if things are working fine as they are, you are probably ok.
Of course, after an OS update, things might just stop working, so it is probably better to prepare to move the dependency on interactivity out, as you don't really need it.
Related Topics
Why Isn't There Generic Variance for Classes in C# 4.0
C# Switch Statement Limitations - Why
Up, Down, Left and Right Arrow Keys Do Not Trigger Keydown Event
Call Asynchronous Method in Constructor
Does Using "New" on a Struct Allocate It on the Heap or Stack
Hide Console Window from Process.Start C#
How to Check Whether a String Is a Valid Http Url
What Difference Does .Asnotracking() Make
Load an Exe File and Run It from Memory
How to Properly Exit a C# Application
How to Elevate Privileges Only When Required
Get Name of Property as a String
Associating Enums with Strings in C#