How to use command line and direct the called application window to the desired monitor within the multi-monitor environment? RRS feed

  • Question

  • Hi !

    I need to run the IE9 using the multi-monitor environment.

    In my concrete case, I run IE9 in 4 sessions from the command lines, with different web address each time and want to see every session in the different monitor identified in the system as monitor 1..4.

    Is it some parameter, I need to use within the command line, which directs the running IE9 window to the desired monitor ?

    If it is not a command line, than probably the PowerShell script issue, isn't it ? PLease, advise.

    Thank you in advance,



    Friday, February 17, 2012 5:05 PM

All replies

  • Hi,

    There is no command line parameter which directs the running Internet Explorer window to the desired monitor.
    C:\Program Files\Internet Explorer>start iexplore.exe –new www.google.com

    You can try to run some third party program.

    • Marked as answer by Arthur Xie Wednesday, February 29, 2012 9:49 AM
    • Unmarked as answer by BoJa2000 Wednesday, February 29, 2012 12:39 PM
    Wednesday, February 22, 2012 6:59 AM
  • Hi,

    the real answer I have created on my own playing a bit with PowerShell 2.0 - and this is something, I was expecting from the MS forum...

    The possible solution looks like this:

    function Run_IE ([int]$resX, [int]$resY, [int]$shiftX, [string]$site_addr) {
    $ie = New-Object -ComObject InternetExplorer.Application
    $ie.Width = $resX
    $ie.Height = $resY
    $ie.Left = $shiftX
    $ie.ToolBar = 0
    $ie.StatusBar = $FALSE
    $ie.Resizable = $FALSE
    $ie.visible = $TRUE


    $ie1 = Run_IE 1920 1080 0 "http://www.microsoft.com"

    $ie2 = Run_IE 1920 1080 1920 "http://www.microsoft.com/visualstudio/en-us"

    They are available two variables ($ie1 and $ie2) within the PS session and you can manipulate the IE windows, as you want - they are under your control. Of course, when you call this PS code saved in file from within the PS console, it is necessary to use the "dot source" syntax in order to keep the variables available globally within the session.


    Wednesday, February 29, 2012 12:29 PM