Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

There is a program currently running which I would like to maximize. Normally I would do this from the start menu by hovering -> right click window -> maximize. I would prefer to craft a batch file for this process.

Windows 7 x64

Thank you in advance for any assistance!

share|improve this question
up vote 3 down vote accepted

Nircmd is an excellent utility for manipulating Windows from the command line. It includes a command to minimse a window based on .exe, class or title.

share|improve this answer
nircmd.exe win max process TheProgramName.exe <--- thanks paul it is in the help file – Psycogeek Oct 20 '11 at 8:48
Good stuff! Works like a charm. Thank you Paul :-) – Matt Oct 20 '11 at 20:20

For MicrosoftEdge WebDriver automation purposes
I used above suggested nircmd.exe
to do below tricks on MicrosoftEdge web browser, after its startup, on Windows 10, with below mentioned commands:

Tricks tried:
set size (resize) window, minimize windows, maximize, activate, set top most Window

Commands used:
C:\Programs\nircmd-x64\nircmd.exe win setsize process MicrosoftEdge.exe 0 0 800 600
C:\Programs\nircmd-x64\nircmd.exe win min process MicrosoftEdge.exe
C:\Programs\nircmd-x64\nircmd.exe win max process MicrosoftEdge.exe
C:\Programs\nircmd-x64\nircmd.exe win activate process MicrosoftEdge.exe
C:\Programs\nircmd-x64\nircmd.exe win settopmost process MicrosoftEdge.exe

1. For Internet Explorer browser, replace the MicrosoftEdge.exe in the above with "iexplore.exe", also make sure that you have only test Browser window/ windows running.
2. I have downloaded 64 bit NirCmd from here. And downloaded & unzipped it to a newly created "C:\Programs\" directory.

Hope this is useful to quick start.
Best of luck

(Upvote if this is useful)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.