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

后端 未结 2 654
野性不改
野性不改 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:32
    start "some-text"
    

    starts a new command window with "some-text" as the title of the window. To start a program, do not use the quotes around the argument

    start program-name
    
    0 讨论(0)
  • 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
    
    0 讨论(0)
提交回复
热议问题