Process.Start(“echo”, “

后端 未结 3 1428
误落风尘
误落风尘 2021-01-19 00:41

When I try to do Process.Start(\"echo\", \"%cd%\") it raises a System.ComponentModel.Win32Exception: The system cannot find the file specified. Whe

3条回答
  •  南方客
    南方客 (楼主)
    2021-01-19 01:21

    Try Process.Start("cmd.exe", "/c echo %CD%")

    as far as echo is not an executable but a command inside.

提交回复
热议问题