Starting multiple Chrome full screen instances on multiple monitors from (batch) script
Solution 1:
I've decided to create my own powershell script based on WinApi calls:
- You may download the solution at GitHub: Tomin.Tools.KioskMode.zip
- Steps how to use it - on the main page of the GitHub project or
- Complete Description is available as WordPress Blog article: https://alextomin.wordpress.com/2015/04/10/kiosk-mode-in-windows-chrome-on-multiple-displays/
Shortly
Script does the following:
- Start a Chrome instance via script
- Now use WinApi to find started window and move it to the desired screen
- Send F11 key to the moved window to make it full screen (we could start chrome already in full screen mode, but moving windows in that mode would be not so trivial)
- Do the same with other instances, specifying necessary URL.
My final script (function definitions are hidden in Dll and another helper script) looks like the following:
$chromePath = 'C:\Program Files (x86)\Google\Chrome\Application\chrome.exe'
$chromeArguments = '--new-window --incognito'
# &taskkill /im chrome* /F
Chrome-Kiosk 'http://google.com' -MonitorNum 1
Chrome-Kiosk 'http://http://www.bbc.com/' -MonitorNum 2
Solution 2:
I have managed to solve it with different user profiles.
First time to set it up, you start Chrome, without kiosk-mode, and with a random user data dir. (This does not have to exists, Chrome creates it.)
chrome.exe --user-data-dir="%userprofile%/AppData/Local/Google/Chrome/User Data/monitor1" "http://example.com/monitor1.html"
Then move it to correct monitor and close Chrome again. (The position get saved in the user profile.)
Then just to fire it up in autostart with kisok mode:
chrome.exe --user-data-dir="%userprofile%/AppData/Local/Google/Chrome/User Data/monitor1" --kiosk "http://example.com/monitor1.html"
Do the same for the rest of the monitors. Every Chrome with different user dir is totally independent. (I also use this to have separate proxy settings on Chrome running next to each other.)