SUMMARY: Force a program executed by a batch file to minimize to the Windows Taskbar or appear full-screen.
In some instances, when creating a batch file in Windows XP, you may wish to execute a program and force it to display as a full-screen window. Perhaps the application is displaying information that you or the batch file's intended user needs to see, and by opening the window normally the information may not be visible due to a smaller window size.
Conversely, a batch file may need to run an application that its user normally should not need to see. Perhaps an application needs to perform networking or file maintenance operations, and seeing its output may be confusing. If so, the batch file can force an application to start minimized to the Windows XP Taskbar.
To run an application from a batch file and control its window size, use the start command with one of the following options before the name of the application you want to execute:
/max : Starts a window maximized (full-screen)
/min : Starts a window minimized to the Windows Taskbar
For example, assume you have an application called reconnect.exe, a theoretical Windows application that reconnects file shares. This application opens a window, performing networking operations and displaying debugging results, and then closes. The following command in a batch file would run this program minimized so as to cause less distraction for its users:
start /min reconnect
Note that some applications will ignore the /min and /max command-line options and open as a normal-sized window.
Return to the Windows XP and DOS page.
The MalekTips website was created in 1998 by Andrew Malek of Envision Programming. The page's goal is to freely disperse computer-related tips, hints, and informative articles. Tips are organized to be easy to find, and are presented clearly, in easy-to-understand language.