I've got a virtual machine running on Windows 7 called "VirtualXP-12345". I tried using
System.Diagnostics.Process.GetProcesses("VirtualXP-12345")
from the host machine but that doesn't work. I just get InvalidOperationException("Couldn't connect to remote machine.").
I am trying to write a program that checks that a particular process is running on a PC, including all virtual machines also running on that machine. It works fine using Pocess.GetProcesses() on the local non-virtual machine, but I need to determine if the process is running anywhere on the local machine, as it needs to be shut down in order to update files in use.