Hide Command Window of .BAT file that Executes Another .EXE File

前端 未结 15 2123
猫巷女王i
猫巷女王i 2020-12-02 12:50

This is a batch file in Windows.

Here is my .bat file

@echo off
copy \"C:\\Remoting.config-Training\" \"C:\\Remoting.config\"

\"C:\\ThirdPar         


        
15条回答
  •  旧巷少年郎
    2020-12-02 13:40

    Or you can use:

    Start /d "the directory of the executable" /b "the name of the executable" "parameters of the executable" %1
    

    If %1 is a file then it is passed to your executable. For example in notepad.exe foo.txt %1 is "foo.txt".

    The /b parameter of the start command does this:

    Starts an application without opening a new Command Prompt window. CTRL+C handling is ignored unless the application enables CTRL+C processing. Use CTRL+BREAK to interrupt the application.

    Which is exactly what we want.

提交回复
热议问题