Announcement

Collapse
No announcement yet.

Run Two Instances of IrfanView with Different .ini files

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

    Run Two Instances of IrfanView with Different .ini files

    I run ifraview silent in my VB application.

    Process.Start(********)

    Today I need to have two diffrent ini files wich contains the diffrent settings for example format and printer name.

    When I like to print for printer1 then I change the ini file to printer1.ini
    then Process.Start(***************)

    print Printer2 change to printer2.ini
    then Process.Start(**************)

    It feels like sometime change of the printer goes to fast so the settings in the ini file get not correct.



    Maybe I can run two diffrent .ini and process Ifraview..

    Then I "only" need to change the Process.Start's parameters for the Ifraview... is this possible?

    #2
    Try to start IrfanView using the ini commandline switch.

    /ini="Folder" - use the folder "Folder" for INI/LST files (read/save)

    Comment


      #3
      I´m not sure what you mean...
      I guess I should have diffrent .ini files like I have now.
      But I should have 2 version of Irfaview installed to? but change the ini file settings for each irfaview should use.
      And then make two diffrent Process-Starts to the diffrent Irfaview? Is thats correct?

      Comment


        #4
        OK - I'll explain what I mean. I hope that's what you would like to do.
        Here is the example:
        - On my Systen IrfanView is installed in folder (directory) named C:\Programme\IrfanView
        - I create a new folder named C:\IV_ini_1
        - Into this folder I put the first IrfanView ini-file named i_view32.ini. This ini-file contains the settings for printer1.
        - I create another new folder named C:\IV_ini_2
        - Into this folder I put the second IrfanView ini-file named i_view32.ini. This ini-file contains the settings for printer2.
        - To start IrfanView with settings for printer1 the commandline is C:\Programme\IrfanView\i_view32.exe /ini="C:\IV_ini_1"
        - To start IrfanView with settings for printer2 the commandline is C:\Programme\IrfanView\i_view32.exe /ini="C:\IV_ini_2"

        Comment


          #5
          Can't get it to work correct.
          How do you write the complete line..

          "C:\Programme\IrfanView\i_view32.exe" /ini="C:\IV_ini_1" "C:\FileToprint.BMP" /killmesoftly /silent

          Or do you still have to set the printer? Maybe it can get the printer from the ini file to?


          "C:\Programme\IrfanView\i_view32.exe" /ini="C:\IV_ini_1" "C:\FileToprint.BMP" /killmesoftly /silent /print="HP Printer1"

          Looking forward to your replay...

          Comment


            #6
            One complete example commandline is:

            C:\Programme\IrfanView\i_view32.exe C:\FileToPrint.gif /ini="C:\IV_ini_1" /print="Brother HL-2030 series" /killmesoftly

            The commandline do the following:
            - Start IrfanView program
            - Open specified image
            - Load settings (format etc.) from i_view32.ini in specified folder
            - Print image to specified printer
            - Close all IrfanView instances

            I have tried it with two different printers and run the commandline from DOS-prompt. It works ok.
            That is all I can say about it. For your own environment (printers, printer-drivers, VB-commands, VB-timing etc.) you have to try by yourself. Good luck!!!

            Comment


              #7
              Did you sort out your problem kavvis. I am afraid I did not notice your post before. Presumably the process that you are trying to start is the Irfanview process i_view32.exe. The rest of the command line that GKA is quoting will probably have to be sent as Arguments. It is a long time since I wrote any VB so I cannot remember how that was done.

              If the file to be opened by Irfanview is one of the arguments to be passed (as a text string) then it must be the first one. The options which all start with a forward slash (/) can be sent as further arguments. Irfanview will also accept all the arguments strung together as a single text string though, if that is easier, but again the file to be opened must be first in the string.

              Comment


                #8
                In operating system why not boot to a different login administrator name and you then have to setup the printers separately and irfanview too as well as setup all your internet browsers differently and logins there too. Many aspects are different using a different windows login member name. Course kids could mess everything up if it were not that way. Just a thought to try that.

                Comment


                  #9
                  This thread is five years old. Kavis has not posted since 2013.
                  Before you post ... Edit your profile • IrfanView 4.62 • Windows 10 Home 19045.2486

                  Irfan PaintIrfan View HelpIrfanPaint HelpRiot.dllMore SkinsFastStone CaptureUploads

                  Comment

                  Working...
                  X