Hi,
This code is written in c#.net windows application.
I am trying to get all the processes by name using Process.GetProcessesByName("Exe Name") and for some reason this doesn't work in Windows Vista, does anyone have any idea
Hi,
This code is written in c#.net windows application.
I am trying to get all the processes by name using Process.GetProcessesByName("Exe Name") and for some reason this doesn't work in Windows Vista, does anyone have any idea
Windows Vista - Process.GetProcessesByName doesn't work
dba72
What do you mean with that it doesn't work
I did a quick test with C# express. I saw difference if the extension is included. Not sure if this is similar on XP, only have 1 computer.
Process[] arrP = Process.GetProcessesByName("explorer.exe"); // gives no itemsarrP = Process.GetProcessesByName("explorer"); // gives one item
omicron9839102123
I am having issues with Process.GetProcessesByName("Sierra") , the current software runs fine on XP but when I try to run it on Vista I get "Couldn't Get Process Information from Remote Machine" . The program is written in VB with VS2003. Any Ideas would be appreciated.
Shobha69358
This seem to be by design. You can not get process information unless you have permissions to it. The Task manager seem to do it differently. Probably via WMI.
haihtomy
Here is the code that I tried,
Process[] allProcesses = Process.GetProcessesByName("Exe Name");
I throws an exception saying "Couldn't get process information from remote machine".
fabianus
As you get a remote machine error it seem you are trying to do it from a network drive. Copy the executable to machine you need to run it on and the security zone will be different and it might run.
JPeterson
I found a solution.
On the Vista machine you have to start the "Remote Registry" service. Then you can get the processes from the Vista machine remotely. Otherwise it only works locally. Start the service and it works, stop the service and it doesn't. That simple.
I found the resolution at http://msdn2.microsoft.com/en-us/library/aa381831.aspx
which is instructions for getting the ITaskScheduler to work on Vista for scheduling tasks remotely. Fixing that corrected the Process.GetProcessesByName("exename", "vistapc") error I was getting.
Hope this helps,
Craig
Parvaneh
Territorial Musings
Process[]arrProcess=Process.GetProcesses(strMachineName);
System.InvalidOperationException:Cannot open Service Control Manager on computer xyz. This operation might require other previliges. ---> System.ComponentModel.Win32Exception: Access is denied.
It works fine when I am monitoring an application on my local computer by giving its IP Address. But it does not work for remote computers. I believe It has something to do with user accounts and privileges on both machines but not sure how to go about them. Please help me! I have enabled remote administration on the computer that is being monitored.