I am trying to create a Windows Service that regularly collects data about the running applications on a computer. The Process.GetProcesses() function works and returns the processes when I am running the service in Visual Studio Debug Mode but it returns an empty array when running in an installed Windows Service. I have already set the Windows Service to interact with the desktop but it still returns empty.
The service already has elevated privileges and is being run as Local System.
Is there any other thing that I can do to make this work? Please help. Thank you very much!