Hi,
I try to call ServerManagerCmd.exe in C#. Below is my code:
ProcessStartInfo startInfo = new ProcessStartInfo("ServerManagerCmd.exe", "");
Process process = Process.Start(startInfo);
However, running this code always throws error "System.ComponentModel.Win32Exception: The system cannot find the file specified".
I have verified ServerManagerCmd.exe is in c:\windows\system32 and I can run it in a command window without specifying the full path.
Also there is no problem to run some other exe files in the same directory through the C# code, for example, wevtutil.exe.
I also called ServerManagerLauncher.exe in C#. It has the same problem as ServerManagerCmd.exe.
Why I cannot call any ServerManager*.exe in C# code?
Thanks a lot for your help.
Thanks
Leon
I try to call ServerManagerCmd.exe in C#. Below is my code:
ProcessStartInfo startInfo = new ProcessStartInfo("ServerManagerCmd.exe", "");
Process process = Process.Start(startInfo);
However, running this code always throws error "System.ComponentModel.Win32Exception: The system cannot find the file specified".
I have verified ServerManagerCmd.exe is in c:\windows\system32 and I can run it in a command window without specifying the full path.
Also there is no problem to run some other exe files in the same directory through the C# code, for example, wevtutil.exe.
I also called ServerManagerLauncher.exe in C#. It has the same problem as ServerManagerCmd.exe.
Why I cannot call any ServerManager*.exe in C# code?
Thanks a lot for your help.
Thanks
Leon