Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to minimize the command prompt when running a batch script?

anybody know how to minimize the command prompt when running a batch script in Windows 3.11?

in Windows XP, there have a command

start /min start.bat 

to minimize the cmd prompt, is it have similiar command in MSDos 6.22?

like image 310
issac Avatar asked Jan 21 '10 03:01

issac


2 Answers

This little batch code should do what you need.

http://zoombody.com/articles/run-a-batch-script-minimized

The relevant code then needs to be placed at the top of your script:

if not "%minimized%"=="" goto :minimized
set minimized=true
start /min cmd /C "%~dpnx0"
goto :EOF
:minimized
rem Anything after here will run in a minimized window

Here is more information about "%~dpnx0".

like image 155
rbprogrammer Avatar answered Oct 17 '22 05:10

rbprogrammer


There isn't a command that you can use from a DOS prompt, however you can create a PIF file that points to your batch file, in which you can set the default window position (including minimized).

...I think. It's been a couple of decades.

like image 39
Greg Hewgill Avatar answered Oct 17 '22 04:10

Greg Hewgill