View Full Version : Run Two Instances of IrfanView with Different .ini files

15.03.2013, 07:07 AM
I run ifraview silent in my VB application.


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?

17.03.2013, 03:38 AM
Try to start IrfanView using the ini commandline switch.

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

19.03.2013, 06:55 AM
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?

20.03.2013, 09:02 AM
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"

20.03.2013, 09:59 PM
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...

21.03.2013, 05:29 AM
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!!!

23.04.2013, 09:07 PM
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.

27.01.2018, 07:35 AM
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.

Bhikkhu Pesala
27.01.2018, 09:11 AM
This thread is five years old. Kavis has not posted since 2013.