for /f closes cmd prompt immediately

前端 未结 3 581
生来不讨喜
生来不讨喜 2021-01-22 02:27

When I open cmd.exe and type that first line and push ENTER, it works fine. When I input that other line and push ENTER, it closes immediately.

I can change (\'a\') to (

3条回答
  •  梦毁少年i
    2021-01-22 03:05

    This guy seems to have solved a very similar problem successfully:

    for /f closes cmd window immediately

    The problem in that case turned out to have to do with the COMSPEC environment variable, it being incorrectly set initially, as it seems. The guy applied logging out of the Windows account and back in.

提交回复
热议问题