Set The Window Position of an application via command line

Inside Man picture Inside Man · Nov 2, 2011 · Viewed 141.8k times · Source

I have an application which start in 0x0 position of my desktop. I want to open it in center of my desktop. I do not want to open it and use a move command to move it into center, just want my app to start immediately in center position.

Is there any way to do this via command prompt? Any other way?

Answer

sorpigal picture sorpigal · Nov 2, 2011

You'll need an additional utility such as cmdow.exe to accomplish this. Look specifically at the /mov switch. You can either launch your program from cmdow or run it separately and then invoke cmdow to move/resize it as desired.