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

前端 未结 15 2193
猫巷女王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:41

    Using start works for me:

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

    EDIT: Ok, looking more closely, start seems to interpret the first parameter as the new window title if quoted. So, if you need to quote the path to your ThirdParty.exe you must supply a title string as well.

    Examples:

    :: Title not needed:
    start C:\ThirdParty.exe
    
    :: Title needed
    start "Third Party App" "C:\Program Files\Vendor\ThirdParty.exe"
    

提交回复
热议问题