1

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!

2 Answers 2

2

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.

2
  • nircmd.exe win max process TheProgramName.exe <--- thanks paul it is in the help file
    – Psycogeek
    Oct 20, 2011 at 8:48
  • Good stuff! Works like a charm. Thank you Paul :-)
    – user70134
    Oct 20, 2011 at 20:20
0

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

Note:
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)

You must log in to answer this question.