I have a remote computer that is always opened with a user, because I am using it as video player in which I have installed Kodi.
In this computer, I have a gRPC service installed, because I would like to can open some applications, close them and do a basic management from a mobile.
This gRPC service is hosted in a ASP Core application, that is installed as windows service. This services is running as SYSTEM user.
I am doing a test trying to open the notepad application, and it is opened, but as system user, so I can't see it in the user that is opened.
My question is, is it possible to open the notepad, or any other application, from this service and open in in the user that has the session opened to can see the notepad?
Perhaps one solution could be run the grpc service with this user, but I prefer to use the system user because some actions will need their permissions.
To open the notepad I am using this code:
ProcessStartInfo start = new ProcessStartInfo();
start.Arguments = string.Empty;
start.FileName = "notepad";
start.WindowStyle = ProcessWindowStyle.Hidden;
start.CreateNoWindow = true;
using (Process? proc = Process.Start(start))
{
if (proc == null)
{
throw new ArgumentException("Handle error");
}
}
Thanks.