Difference between revisions of "Irfanview"

From WPKG | Open Source Software Deployment and Distribution
Jump to: navigation, search
(rewrote the article because xcopy does not work for me (it always asks if the destination is a dir or a file))
Line 1: Line 1:
[http://www.irfanview.com Irfanview] is an image viewer that has some additional features
+
[http://www.irfanview.com Irfanview] is an freeware image viewer with many additional features
  
Basic install:
+
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:
  
<package id="irfanview" name="Irfanview 3.93" revision="1" >
+
i_view32.ini:
  <check type="file" condition="exists" path="c:\Program Files\Irfanview\i_view32.exe" />
+
<pre>
  <install cmd='\\server\software\irfanview\iview390.exe /silent /folder="c:\Program Files\Irfanview" /desktop=1 /group=1 /allusers=0 /assoc=1' >
+
[Others]
      <exit code="0" />
+
INI_Folder=%APPDATA%\Irfanview
  </install>
+
</pre>
</package>
+
  
The problem with irfanview is that it likes to write to i_view32.ini in the same folder, which is a problem if the user does not have permissions. You can create an INI file to redirect this to the user's Application Data folder though:
+
Than we need a batch-file because "copy" is not awailable in wpkg and "xcopy" will not always work in silent mode.
  
* Create a i_view32.ini file:
+
install.cmd:
 +
<pre>
 +
copy /y "\\server\software\irfanview\i_view32.ini" "%ProgramFiles%\Irfanview
 +
\\server\software\irfanview\iview390.exe /silent /folder="%ProgramFiles%\Irfanview" /desktop=1 /group=1 /allusers=0 /assoc=1
 +
</pre>
  
    [Others]
+
<pre>
     INI_Folder=%APPDATA%\Irfanview
+
<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>
  
* copy this into the IrfanView directory. You can do this in wpkg using the patch in [http://bugs.wpkg.org/show_bug.cgi?id=18 bug #18] (as of wpkg 0.9.3, this is not merged):
 
  
  <install src="\\server\software\irfanview\i_view32.ini" dest="c:\Program Files\Irfanview" overwrite="true" />
+
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]
  
* An alternative method is to use xcopy:
+
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" />
  
  <install cmd='xcopy /y "\\server\software\irfanview\i_view32.ini" "C:\Program Files\Irfanview\" '>
 
    <exit code="0" />
 
  </install>
 
  
 
[[category:Silent Installers|Irfanview]]
 
[[category:Silent Installers|Irfanview]]

Revision as of 11:00, 26 April 2006

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:

i_view32.ini:

[Others]
INI_Folder=%APPDATA%\Irfanview

Than we need a batch-file because "copy" is not awailable in wpkg and "xcopy" will not always work in silent mode.

install.cmd:

copy /y "\\server\software\irfanview\i_view32.ini" "%ProgramFiles%\Irfanview
\\server\software\irfanview\iview390.exe /silent /folder="%ProgramFiles%\Irfanview" /desktop=1 /group=1 /allusers=0 /assoc=1
<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>


As an alternative method you can use a patch to enable a easy copy-function in wpkg. It comes as an attachment to bug #18

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" />