Windows: Open program in specific screen location

16,871

It look like someone as already answer that kind of question here :

Other post on set many programs window size and position

You can also use C# and map powershell on it using cmdlet in powershell and c# as backend. Here is an exemple in c# and just google how to make cmdlet in powershell.

Example in c#

Share:
16,871
Matt M
Author by

Matt M

Updated on June 04, 2022

Comments

  • Matt M
    Matt M almost 2 years

    At work, I have a set of batch files and scripts which I use to automate all the programs I need to open in the morning (and others to close them all down at night) in order to save time and effort. The problem is, the windows all open in whatever location they so choose, since most of the information is cleared out overnight on the Virtual Desktop.

    I have seen people talking of desktop managers and additional programs that make such tasks easier, but due to the restrictions at play, I do not have the ability to install programs like that. I also do not have access to edit registry files, and I can never be sure if the registry files will stay the same or be wiped and reimaged at night. So re-opening at the stored previous location seems to be out. This means that AutoHotKey , cmdow , and most .exe program options are out of the running.

    Essentially what I am looking for is a way to reposition open windows, or open windows in a specific position, using either batch files or vbs. Preferably with a location relative to the screen rather than other windows, as I use multiple monitors.

    I'm open to using powershell or potentially other options, but those would likely fall outside my experience. It seems like what I'm asking is either nonexistent or impossible, but I'm hoping maybe someone has an idea. I don't mind complicated code, but I have no idea where to begin on this one guys, any suggestions?