4

I have a Surface Pro 4 with Windows 10 Education x64 plugged into a USB dock that I use as a desktop machine in my office. I have a dual monitor setup on the dock, and use the Surface itself as a third display off on the right.

I've been trying to figure out how to launch two maximized Chrome windows at startup so that each goes to a different URL, and one opens on the main display on the left while the other opens on the center display. According to another article I read and the list on this page, creating two shortcuts in the startup folder with the --new-window, --window-position=X,Y, and --start-maximized switches with the URLs after them SHOULD accomplish what I'm trying to do, and it does successfully open two different windows at those URLs, but the position and maximize switches are ignored. I've noticed that using either of those shortcuts while an existing Chrome window is open will always open it at the same position as the existing window instead of where I've specified in the switch values, and will not maximize the window either.

During my Google-fu, I managed to find this similar question and despite the fact that I'd rather not use app mode, I tried using the command line script included in the answer just to see if it would work the way I'd like. But this unfortunately gives me the same results as using the command line switches. Here are the lines I've tried:

With command line switches

"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --profile-directory="Default" --new-window --window-position=0,0 --start-maximized http://www.example1.com

"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --profile-directory="Default" --new-window --window-position=1680,0 --start-maximized http://www.example2.com

With javascript and command line switches

"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --app="data:text/html,<html><body><script>window.moveTo(0,0);window.location='http://www.example1.com';</script></body></html>" --start-maximized

"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --app="data:text/html,<html><body><script>window.moveTo(1680,0);window.location='http://www.example2.com';</script></body></html>" --start-maximized

With javascript and manual window size values to make up for the lack of maximizing

"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --app="data:text/html,<html><body><script>window.moveTo(0,0);window.resizeTo(1680,1010);window.location='http://www.example1.com';</script></body></html>"

"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --app="data:text/html,<html><body><script>window.moveTo(1680,0);window.resizeTo(1680,1010);window.location='http://www.example1.com';</script></body></html>"

(The two displays from the dock run at 1680x1050, but I'd measured out that the Taskbar is 40px tall so I took that into consideration when I gave the size values)

Is there a more elegant way to accomplish what I'm trying to do? Could one of the other command line switches be overriding the --start-maximized switch? Do you have any suggestions for some better practices?

Thanks!

1
  • Did you try to create two different named linking points, one per monitor and start it just with the url as command ?
    – Tech-IO
    May 8, 2017 at 22:14

1 Answer 1

0

I got same issue: second chrome window starts on same screen as first window.

But i found simple workaround: open second window in another browser: edge or chromium. Edge has same engine so all arguments are identical with chrome.

My commands:

"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --kiosk --new-window --window-position=0,0 http://www.example1.com

"C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" --kiosk --new-window --window-position=2160,0 http://www.example2.com

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .