Strange behavior with Process.Start and dfsdiag.exe
-
23-03-2021 - |
Question
DfsDiag.exe
is located by default in C:\windows\system32
. I try to start a process for it with Process.Start
but I always seem to get the error The system cannot find the file specified
.
I don't seem to have the problem with anything else so far.
I tried...
- Specifying the full path
@"C:\Windows\System32\DfsDiag.exe"
- Copying the file to the running directory.
The former failed while the latter worked. I can't for the life of me work out why.
(OS is Windows Server Standard 2008 R2)
Solution
32-bit app? You've fallen foul of filesystem redirection. Try C:\Windows\SysNative.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow