Okey, so I want my C# program execute two following console commands.
takeown /f "c:\windows\system32\Utilman.exe"
icacls "c:\windows\system32\Utilman.exe" /grant administrators:F
My problem is that C# cannot handle additional “s in path. (also tried to use escape sequences with no luck)
If you mean you have problems with the
"embedded in the command line parameters, you simply need to escape them:I have used verbatim string literals (those that start with
@) to avoid having to escape the\in the paths as I would need to do with other string literals.