How do I minimize the command prompt from my bat file

前端 未结 12 848
攒了一身酷
攒了一身酷 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:52

    Yet another free 3rd party tool that is capable of minimizing the console window at any time (not only when starting the script) is Tcl with the TWAPI extension:

    echo package require twapi;twapi::minimize_window [twapi::get_console_window] | tclkitsh -
    

    here tclkitsh.exe is in the PATH and is one of the tclkit-cli-*-twapi-*.exe files downloadable from sourceforge.net/projects/twapi/files/Tcl binaries/Tclkits with TWAPI/. I prefer it to the much lighter min.exe mentioned in Bernard Chen's answer because I use TWAPI for countless other purposes already.

提交回复
热议问题