Perl programmer for hire: download my resume (PDF).
John Bokma MexIT
freelance Perl programmer

IrfanView forgets settings: fix

Wednesday, November 9, 2005 | 21 comments

IrfanView has been annoyed me for some time: when it's installed with Administrator rights and used by a user with a limited account, which is a very good thing: limited, it doesn't keep its settings. Moreover, it seems to use the settings of the Administrator, which a limited user shouldn't be able to see, in my opinion.

So I contacted the author, Irfan Skiljan, over a month ago. He explained that he uses an INI file, and that a solution is in the FAQ on how to have a per user INI. So I asked him if he could use the registry instead, since that solves the whole problem, or create an IrfanView directory under %APPDATA% and use that one instead.

He replied that: "the registry is a stupid MS idea.", since every "stupid program" saves settings there, but don't delete them after uninstall, which makes the system slow and unstable.

I was amazed at his statements. Maybe the slow and unstable was true with Windows 95, but I haven't seen this with Windows 2000 nor Windows XP. Moreover, since he is the author of IrfanView he has an excellent opportunity to do it right: delete registry entries when IrfanView is uninstalled.

I explained this to him, but as expected, a lot of anti-Microsoft muttering followed, and I was the first one to suggest using the registry, etc. so I decided not to go further into it.

I still consider using the registry the best option, especially since it would have saved me time, time I now wasted on checking out what went wrong (IrfanView forgetting its settings), contacting the author, etc. Microsoft is not going to drop the registry because a few software developers have still bad dreams about Windows 95. Moreover, things that can be fixed in software shouldn't be in the FAQ. Irfan could leave it up to his users to decide, instead of deciding it for them, for example by providing a "Use the registry" as a setting at installation time.

The fix

Ok, so how to fix IrfanView the clumsy way: first, open the folder IrfanView was installed into. On my system this is:

C:\Program Files\IrfanView

Open the file i_view32.ini and add in to the [Others] section:

INI_Folder=%APPDATA%\IrfanView

Next time a user uses IrfanView a folder IrfanView is created under %APPDATA%, which is a good place to store the users application data (hence the name of this environment variable). This variable is expanded (on my computer) to:

C:\Documents and Settings\John\Application Data

if and only if as I log in as user "John".

The FAQ entry on Irfan's site mentions several options, all are bad in my opinion. The first three use a TEMP directory (ok, that's not bad but stupid). And the last one uses %YOUR_ENVIRONMENT_VARIABLE%. Not much help there.

Oh, and according to the author, those per user files are not deleted when you uninstall IrfanView. So much for his rant against programs making a mess. Personally I think it should be an option, by the way.

IrfanView related

Also today

Please post a comment | read 21 comments, latest by cluster | RSS feed