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

前端 未结 9 873
走了就别回头了
走了就别回头了 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:36

    Add /B, as documented in the command-line help for start:

    C:\>start /?
    Starts a separate window to run a specified program or command.
    
    START ["title"] [/D path] [/I] [/MIN] [/MAX] [/SEPARATE | /SHARED]
      [/LOW | /NORMAL | /HIGH | /REALTIME | /ABOVENORMAL | /BELOWNORMAL]
      [/NODE ] [/AFFINITY ] [/WAIT] [/B]
      [command/program] [parameters]
    
    "title"     Title to display in window title bar.
    path        Starting directory.
    B           Start application without creating a new window. The
                application has ^C handling ignored. Unless the application
                enables ^C processing, ^Break is the only way to interrupt
                the application.
    

提交回复
热议问题