Window Position Restore

Japanease Page

Overview

With PCs, it has become easier to build a wider display and multi-display environment, and more and more applications have been launched.
There are things that save the window position at the end of the application and restore it at startup, but if you launch the same application multiple times, it is necessary to adjust the window position each time with the Windows snap function etc.
In order to eliminate the annoyance, I created an application that saves the startup information and window position of the application, and can launch it at once and restore the window position.

Feature

  1. Supports both desktop apps and store apps (UWP apps).
  2. After launch application, change the set window position and size.
  3. The xml configuration file that has been used to "Launch" is displayed as a history in the menu. By clicking the file name of the history, it will be immediately executed without displaying the window of this application.
  4. By executing this application with the xml configuration file that saves the execution information as an argument, you can only execute the application of the xml setting file without displaying the window of this application.
  5. Even without checking the command argument, you can get the command if you start in administrator mode.

Operating environment

Terms of use

Free software. Available for free.
Use this software at your own risk. The author is not liable for any damages or disadvantages resulting from use.

Download

WindowPositionRestore.zip(64bit) Version1.3.1.2
WindowPositionRestore32.zip(32bit) Version1.3.1.2
*When the message "Windows protected youru PC" is displayed after starting the exe file, click the "More info" link and then click the "Run anyway" button.
*Since the author doesn't own the Windows 10 32bit environment, the 32bit version has been confirmed to run in the 64bit environment of Windows 10 and 11. If you have any problems, please email me.

About donations

If you like this software, please consider donating with PayPal. The donations received will be used for development costs.
I cannot respond to refunds of donations once sent.
In addition, there will be no difference in the addition of functions and support depending on whether or not there is a donation.
Please note.

Donate with PayPal

Usage overview ( Launcher function )

  1. Unzip the downloaded compressed file and copy it to a suitable folder.

  2. Run "WindowPositionRestore.exe" as administrator.
    *It just shows an icon in the task tray.
    *If you do not run as administrator, you cannot get the "CommandLine" of the "List of Windows" for the desktop application.
    *If you do not need to acquire "CommandLine", you do not need to run as administrator.

  3. Launch the app you want to launch from the Windows Start menu. (The application can be run even before WindowPositionRestore.exe is started.)

  4. Right-click the "Window Position Restore" icon on the task tray and click "Show Window" in the displayed menu to display the "Display Window" and "List of Windows".

  5. Click the "Set" radio button in the "Display Window".

  6. In the "List of Windows", change the settings of the application you want to launch.
    1. Set a numerical value in the "Launch order" of the window you want to execute.
    2. *If "Launch order" is blank, click it to set the number automatically.
    3. If an argument is required, add a space after the command in "CommandLine" and set the argument.
    4. Example) If you want to display the D drive in Explorer, add " D:\" and make it "C:\WINDOWS\Explorer.EXE D:\".
    5. Set the window position and size with "x", "y", "width", and "height".
    6. *You can also change the window position by dragging the window rectangle in the "Display Windows".

  7. In the "Display Window", press the "Launch" button.
  8. In the "List of Windows" window, instead of "minimize", launch the application that has "Command Line" and "Launch order" specified in the order of "Launch order". After launching the application, if the "width" and "height" are greater than 0, change the position and size of the window.

  9. Use the "Save" button in the "Display Window" to save the "List of Windows" list.
  10. From the next time, you can launch the app by loading the file saved with the "Load" button in the "Display Window" and then pressing the "Launch" button. In addition, if you execute "Launch" after saving once, xml configuration file will be saved as history in the task tray menu. Just click on the file name of the history to launch xml configuration file.

  11. To exit the application, press "Exit" in the menu.

Usage overview (Window layout restoration function)

In the following cases, it's difficult to rearrange the windows, so I added a function to memorize the window positions of all virtual desktops in memory and restore the positions.
  1. If you use a 4K display and a 2K display as a multi display with the DISPLAY PORT cable, it will switch to the power saving mode, and after returning from it, the layout and size of the displayed window will change.
  2. When using multi-display on a laptop, remove the sub-display and reattach it
*There is only one memory for each of the manual and automatic memory, and they will be lost after "Window Position Restore" is completed.
*If you do not start "Window Position Restore" in the administrator mode, the windows stored in the memory will be excluded from the applications started in the administrator mode.

Menu related to window layout restoration
Menu related to window layout restoration
  1. You can manually save the window position information by clicking "Save position of windows in memory" on the taskbar menu.
  2. If you check "Restore position of windows after unlocking windows" on the taskbar menu, the window position at the time of locking will be saved (updated if already saved) and unlocked The restoration process starts automatically.
  3. If the above automatic processing does not work, you can manually restore the window position by clicking "Restore window position from memory" in the taskbar menu.
  4. *When a large number of windows are displayed, automatic processing may not work properly. This is because the window information is saved when locked, but the display power saving is activated and the window information is rewritten during saving.

Detail of function ( Launcher function )

This application mainly consists of "Display Window", "List of Windows".
  1. Display Window
  2. Display Window
    On the screen for checking the application window, the display area and the main window are displayed as rectangles.
    The window rectangle can be dragged and moved.
    1. Display rectangle: The connected display is represented by a rectangle.
    2. Information is displayed along with the size in order from Display1.
    3. Window rectangle: The window is represented by a yellow rectangle.
    4. Click the border to make a selection window rectangle. When the "Display" radio button is on, selecting a window brings the selected real window to the front.
    5. Selected window rectangle: The selected window is represented by a red rectangle.
    6. If the "Display" radio button is activated, the image of the current window is displayed within the selected border. The real window is moved by dragging the border.

    7. "Display" radio button: When it's on, the displayed main window is displayed in real time.
    8. The display mode is used to get the command line of the app and determine the window position.
    9. "Set" radio button: Enters setting mode when on.
    10. When it's on, "Load" button, "Save" button, "Launch" button will be available.

    11. "Load" button: Loads the saved xml configuration file.
    12. When the xml configuration file is opened, the window list is reset with the contents of the specified xml configuration file.
    13. "Save" button: Saves the list of windows as an xml setting file.
    14. "Launch" button: In the "List of Windows" window, instead of "minimize", launch the application that has "Command Line" and "Launch order" specified in the order of "Launch order".
    15. After launching the application, if the "width" and "height" are greater than 0, change the position and size of the window.

  3. List of Windows
  4. List of Windows
    Display and set the window list.

    When the "Display" radio button of "Display window" is turned on, the window displayed on the screen not set to "List of Ignore Windows" is displayed in real time.
    By right-clicking the mouse, a shortcut menu related to "List of Ignore Windows" described later is displayed.

    If the "Set" radio button of "Display window" is on, set the window to be executed.
    You can add and delete rows by right-clicking the mouse.

    1. Window title: When the "Display" radio button is on, the window title is displayed in real time.
    2. If the "Set" radio button is on, you can set any character string. This string has no effect on launching the app.
    3. minimize: Displays "○" when the window is minimized.
    4. When the "Display" radio button is on, clicking "Minimize" minimizes the window display and returns to the window display when it is minimized.
    5. Launch order: Set the order to execute the application when pressing the "Launch" button.
    6. When blank, click to set the number with the maximum number + 1.
      When a numerical value is set, it becomes blank when clicked.
    7. Wait (msec): Sets the pause time in milliseconds after starting the application when the "Set" button is pressed.
    8. When launching a app, the startup time of the app may be slow, and the window may not be moved correctly. In such a case, set a numerical value and adjust the delay time for the window movement command.
    9. Command Line: Displays and sets the execution command.
    10. In the case of a desktop application, the application is started with the setting value of the execution command as it is.
      For store apps, set AUMID (AppUserModelID = packagefamilyname + "!" + Application.id).
      If a command or argument contains a space, enclose it in "(double quotes).
      Example) When opening "C:\Program Files (x86)" with Explorer, use "C:\WINDOWS\Explorer.EXE "C:\Program Files (x86)"".
    11. STORE APP: Displays "〇" if the app is a store app.
    12. When the "Set" radio button is on, you can turn on and off "〇".
      When the "Launch" button is pressed, the "〇" line is the execution command in the store application execution method.
      On the other hand, the line that is not "〇" is the execution method of the desktop application, and the "execution command" is executed.

    13. x: Display and set the x coordinate of the visible upper left corner of the window.
    14. The coordinates of the upper left corner of the main display are x = 0, y = 0.
      If multiple displays are connected, the display other than the main display is on the left side of the main display, the x coordinate will be-(minus).
      Also, the display other than the main display is above the main display, the y coordinate is marked with-(minus).
      *The display number was not relevant.
    15. y: Display and set the y coordinate of the visible upper left corner of the window.
    16. width: Displays and sets the window width.If 0, the background color of the entire row is yellow.
    17. height: Displays and sets the window height.If 0, the background color of the entire row is yellow.

  5. List of Ignore Windows
  6. List of Ignore Windows
    When the "Display" radio button is on, windows that you do not want to be displayed can be set in the ignore list.
    1. In the "List of Windows" window, select the window you do not want to display.
    2. Press the right mouse button to display the shortcut menu.
    3. Click "Add to ignore list". *If you want it to be displayed again, set "Exclude from ignore list" in the "List of Ignore Windows".

Precautions for use

  1. About the windows displayed in the "List of Windows"
  2. The "List of Windows" window displays windows that are non-zero in size.Therefore, a hidden window of the system may be displayed. Please be careful not to minimize or launch those windows that cannot be seen in the taskbar.
  3. Although this application is created to be general purpose, it is not possible to get and start the execution commands of all applications.
  4. The reason is that it is difficult to analyze all apps, such as Chrome, which will be described later, because there is a difference in the activation mechanism and window control for each app.
  5. About starting Chrome
  6. When Chrome is started with a URL specified as an argument, if a chrome window already exists, a tab is added and displayed. If you specify " --new-window" with the URL argument, it will be displayed as a new window.
  7. About starting Edge(UWP version)
  8. When Edge is started by specifying URL as an argument, if an Edge window already exists, a tab is added and displayed. Since there is no option like Chrome, if an argument is set and the width and height are greater than 0, an empty Edge window is displayed once and it is moved to the URL of the argument. Therefore, the first page is displayed once.
  9. About starting Edge(Chromium version)
  10. Because the new Edge is based on Chromium, it behaves like Chrome.
    The execution command has also been changed to msedge.exe and it is no longer a UWP application. When displaying a window separately, a new window can be displayed by adding "--new-window" to the execution command like chrome. Also, when a new Edge is installed, the previous UWP version Edge is deleted and it seems that it cannot be returned.
    With such a specification, a new Edge is installed, the edge of the UWP application is registered in the xml setting file, and if you execute "Launch" of this application, you can not move the URL or adjust the position of the window and an error occurs.
    I've done a lot of Edge support, but in the above case, I haven't considered changing the "Command Line" automatically. Therefore, if an error occurs in "Launch", it is necessary to rewrite the "Command Line" to msedge.exe including the path and register the "STORE APP" column off again.

Change log

Feedback


Go back to previous page