Windows – Launching 2 Google Chrome windows in different positions

bootgoogle-chromewindowwindowswindows 7

I am trying to create shortcuts (to eventually add to startup folder) on Windows 7 that will launch Google Chrome as two differently sized window at two different positions, in app mode.

I have two shortcuts:

"C:\Program Files\Google\Chrome\Application\chrome.exe" --app=http://www.example.com --window-size=400,300 --window-position=200,200

and:

"C:\Program Files\Google\Chrome\Application\chrome.exe" --app=http://www.example.com --window-size=400,300 --window-position=600,200

That should launch the first window 400px x 300px, 200px from the left and 200px from the top.

The second window shout launch 400px x 300px, 600px from the left and 200px from the top.

Whichever window I launch first works correctly. If I launch the first shortcut first it launches 200px from the left, if I launch the second first it launches 600px from the top.

However, whichever I launch second launches in the same position as the first.

How can I make these work independently from eachother so whichever I launch does not snap to the position of the first window launched?

Best Answer

The window args don't seem to be working at all in my environment, but following other examples that use javascript to move the window do. Here's an example (switched "Program Files" for 64bit):

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

and the 2nd:

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

The windowing works, but the taskbar icons are set to generic files instead of chrome.

Related Question