Difference between revisions of "Irfanview"

From WPKG | Open Source Software Deployment and Distribution
Jump to: navigation, search
(Removed incorrect information about copy and xcopy. Replaced package with a more sane approache)
Line 1: Line 1:
 
[http://www.irfanview.com Irfanview] is an freeware image viewer with many additional features
 
[http://www.irfanview.com Irfanview] is an freeware image viewer with many additional features
  
The problem with irfanview is that it tries to write the config-file i_view32.ini to the install-dir, which is not appropriate in a multi-user environment. You can create an INI file to redirect this to the user's Application Data folder though:
+
By default irfanview writes the user config-file to i_view32.ini in the install-dir, this is not appropriate in a multi-user environment. You can redirect this to the users Application Data folder by replacing the default i_view32.ini with the following one.
  
i_view32.ini:
+
i_view32.ini: Place this file in your \\server\share\IrfanView\ directory beside the installer.
 
<pre>
 
<pre>
 
[Others]
 
[Others]
Line 9: Line 9:
 
</pre>
 
</pre>
  
Than we need a batch-file because "copy" is not awailable in wpkg and "xcopy" will not always work in silent mode.
 
 
install.cmd:
 
 
<pre>
 
<pre>
copy /y "\\server\software\irfanview\i_view32.ini" "%ProgramFiles%\Irfanview"
+
<package
\\server\software\irfanview\iview390.exe /silent /folder="%ProgramFiles%\Irfanview" /desktop=1 /group=1 /allusers=0 /assoc=1
+
    id="irfanview"
</pre>
+
    name="IrfanView"
 +
    revision="398"
 +
    reboot="false"
 +
    priority="0">
  
<pre>
+
<check type="file" condition="versionequalto" path="%PROGRAMFILES%\IrfanView\i_view32.exe" value="3.9.8.0" />
<package id="irfanview" name="Irfanview 3.93" revision="1" >
+
    <check type="file" condition="exists" path="%ProgramFiles%\Irfanview\i_view32.exe" />
+
    <install cmd='\\server\software\irfanview\install.cmd' >
+
        <exit code="0" />
+
    </install>
+
  </install>
+
</package>
+
</pre>
+
  
 +
<!-- install Irfanview see http://www.irfanview.com/faq.htm for full list of the installer options -->
 +
<install cmd='\\server\share\IrfanView\iview398.exe /silent /folder="%ProgramFiles%\Irfanview" /desktop=1 /group=1 /allusers=1 /assoc=1' />
  
As an alternative method you can use a patch to enable a easy copy-function in wpkg. It comes as an attachment to [http://bugs.wpkg.org/show_bug.cgi?id=18 bug #18]
+
<!-- overwrite the ini file so that user settings are saved in users appdata directory -->
 
+
<install cmd='cmd /c copy /y \\server\share\IrfanView\i_view32.ini "%ProgramFiles%\Irfanview\"' />
After applying that patch, you can use the following format in the packages.xml:
+
<install src="\\server\software\irfanview\i_view32.ini" dest="%ProgramFiles%\Irfanview" overwrite="true" />
+
  
 +
<remove cmd='"%PROGRAMFILES%\IrfanView\iv_uninstall.exe" /silent' />
 +
</package>
 +
</pre>
  
 
[[category:Silent Installers|Irfanview]]
 
[[category:Silent Installers|Irfanview]]

Revision as of 18:47, 21 August 2006

Irfanview is an freeware image viewer with many additional features

By default irfanview writes the user config-file to i_view32.ini in the install-dir, this is not appropriate in a multi-user environment. You can redirect this to the users Application Data folder by replacing the default i_view32.ini with the following one.

i_view32.ini: Place this file in your \\server\share\IrfanView\ directory beside the installer.

[Others]
INI_Folder=%APPDATA%\Irfanview
<package
    id="irfanview"
    name="IrfanView"
    revision="398"
    reboot="false"
    priority="0">

	<check type="file" condition="versionequalto" path="%PROGRAMFILES%\IrfanView\i_view32.exe" value="3.9.8.0" />

	<!-- install Irfanview see http://www.irfanview.com/faq.htm for full list of the installer options -->
	<install cmd='\\server\share\IrfanView\iview398.exe /silent /folder="%ProgramFiles%\Irfanview" /desktop=1 /group=1 /allusers=1 /assoc=1' />

	<!-- overwrite the ini file so that user settings are saved in users appdata directory -->
	<install cmd='cmd /c copy /y \\server\share\IrfanView\i_view32.ini "%ProgramFiles%\Irfanview\"' />

	<remove cmd='"%PROGRAMFILES%\IrfanView\iv_uninstall.exe" /silent' />
</package>