How do I launch a program from command line without opening a new cmd window?

前端 未结 9 849
走了就别回头了
走了就别回头了 2020-12-01 16:00

I\'m trying to programmatically execute an external file from cmd using this command:

START \"filepath\"

Where \"filepat

9条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-01 16:29

    In Windows 7+ the first quotations will be the title to the cmd window to open the program:

    start "title" "C:\path\program.exe"
    

    Formatting your command like the above will temporarily open a cmd window that goes away as fast as it comes up so you really never see it. It also allows you to open more than one program without waiting for the first one to close first.

提交回复
热议问题