Process.Start in Windows\System32 folder

后端 未结 2 1245
别跟我提以往
别跟我提以往 2020-12-20 08:09

Trying to launch a file located in System32 as administrator but it keeps telling me it doesn\'t exist.

Error: System can\'t find specified file Build Target Platfor

2条回答
  •  误落风尘
    2020-12-20 08:35

    Use Environment.SystemDirectory:

    string filePath = Path.Combine(Environment.SystemDirectory, "defrag.exe");
    

提交回复
热议问题