This tip was printed from the MalekTips Computer and Technology Help and Tips website at http://malektips.com.

Windows XP and DOS - Start a Program Minimized or Maximized via a Batch File

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.


 

 

Press the "print" button on your browser or select "File" - "Print" to print this tip. Then, return to Windows XP and DOS - Start a Program Minimized or Maximized via a Batch File

Standard disclaimer applies - read http://malektips.com/disclaim.html