Search code examples
windowscommand-lineposition

Set window position of an application on Windows command line


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

Is there any way to do this via command prompt?


Solution

  • 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.