I am developing a gRPC that is hosted in a ASP application. I install this ASP application as a windows service.
In my computer, I have log in a user account. I want to open a noted pad from the windows service in this user account. But it doesn't work.
If I stop the service and run the application directly from this user, the notepad is opened.
In the properties of the windows service, at first it is started by the system user, and also I have tried to check the option allows to iteract with desktop, but it doesn't work.
Also I have tried to set as user of the service the user in which I am log in, but it doesn't work.
So I would like to know if it would be possible to open an aplication from a windows service in the user that has log in.
Thanks.
CodePudding user response:
Simple answer, no it won't work.
When you log in, you have a session that corresponds to your user, and any UI interaction goes with that. By contrast, a Windows service runs under a user that doesn't have a session associated with the UI, so if it tries to open a window, the window won't appear anywhere.