When i try to run BCDEDIT from my C# application i get the following error:
\'bcdedit\' is not recognized as an internal or external command, oper
There is one explanation that makes sense:
bcdedit.exe
file exists in C:\Windows\System32
.C:\Windows\System32
is on your system path, in an x86 process you are subject to the File System Redirector. Which means that C:\Windows\System32
actually resolves to C:\Windows\SysWOW64
.bcdedit.exe
in C:\Windows\SysWOW64
.The solution is to change your C# program to target AnyCPU
or x64
.