Announcement

Collapse
No announcement yet.

how to run multiple instances of IrfanView from a MSDOS batch file

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    how to run multiple instances of IrfanView from a MSDOS batch file

    How do you run multiple instances of IrfanView from a MSDOS batch file?
    I have tried several ways but only the first occurence of IrfanView gets launched.

    Thank you,
    Kenny.

    #2
    First make sure that Only 1 instance of Irfanview is active is unchecked in the Start/Exit options tab of Options/properties. Then you should be able to open another instance of Irfanview each time the program is called.

    Comment


      #3
      Hi,

      use the "start" command from the command line.

      If you like to run IrfanView and have spaces in the path name like "C:\Program files\IrfanView" you have to use double quotes. And a special feature of the "start" command is that the first parameter in double quotes is the new window title of your DOS box. So you should use something like this:
      Code:
      start "IrfanView" "C:\Program Files\IrfanView\i_view32.exe" picture1.jpg
      This will run IV as a seperate process and opening picture1.jpg and also continuing with the script.

      Regards
      Nils

      Comment


        #4
        "only 1 instance" is un-checked.
        I can launch IrfanView multiple times by clicking on the IrfanView desktop icon multiple times.
        But it won't launch multiple times from a MSDOS batch file.

        I have tried:

        "C:\Program Files\IrfanView\i_view32.exe"
        "C:\Program Files\IrfanView\i_view32.exe"

        but only the first occurence launches.
        when you close the first occurence, the second occurence launches.

        I have also tried:

        start /b "C:\Program Files\IrfanView\i_view32.exe"
        start /b "C:\Program Files\IrfanView\i_view32.exe"

        But no success.
        IrfanView doesn't launch when prefixed with the MSDOS START command.

        Comment


          #5
          Hi Nils,

          thank you it works now

          I new that that space in the Program Files folder name would forever catch me out

          Kenny.

          Comment


            #6
            Yes, I forgot that the batch file waits for the instance of Irfanview to close if you just call it. The Start command, as Nils posted, does work though. The batch file does not then wait for that instance to be closed before moving on.
            I just tried the very simple
            Code:
            start "C:\program files\irfanview\i_view32.exe" %1
            start "C:\program files\irfanview\i_view32.exe" %2
            start "C:\program files\irfanview\i_view32.exe" %3
            and dropped 3 images on it. All 3 were opened together.

            PS: You have to open each instance of Irfanview in a new window. The /b switch you are using tries to open the new instance in the same window. What did you expect /b to do?
            Last edited by Mij; 13.09.2011, 10:20 PM.

            Comment

            Working...
            X