How do I minimize the command prompt from my bat file

前端 未结 12 856
攒了一身酷
攒了一身酷 2020-12-02 14:15

I have this bat file and I want to minimize the cmd window when I run it:

@echo off
cd /d C:\\leads\\ssh 
call C:\\Ruby192\\bin\\setrbvars.bat
ruby C:\\leads         


        
12条回答
  •  难免孤独
    2020-12-02 14:40

    Use the start command, with the /min switch to run minimized. For example:

    start /min C:\Ruby192\bin\setrbvars.bat
    

    Since you've specified a batch file as the argument, the command processor is run, passing the /k switch. This means that the window will remain on screen after the command has finished. You can alter that behavior by explicitly running cmd.exe yourself and passing the appropriate switches if necessary.

    Alternatively, you can create a shortcut to the batch file (are PIF files still around), and then alter its properties so that it starts minimized.

提交回复
热议问题