Why can't I start programs in the command line without /d? (Windows 7x64)

后端 未结 2 655
野性不改
野性不改 2021-01-21 03:17

I am trying to create a batch script that opens a program. I am doing some testing and I can\'t figure this out:

If I run CMD.exe and input start /d \"C:\\wamp\" w

2条回答
  •  鱼传尺愫
    2021-01-21 03:46

    Because the start program's syntax expect the window title as its first quoted argument. (see start /?). You can supply an empty string, however:

    start "" "C:\wamp\wampmanager.exe"
    

    or, if you don't need quotes to mask parts of the path, just leave them out altogether:

    start C:\wamp\wampmanager.exe
    

提交回复
热议问题