Announcement

Collapse
No announcement yet.

set default language via command line

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

    set default language via command line

    Hi, I'm deploying irfanview for multiple user on my domain and I would like to know how to set the default language when they run irfanview to be french ?
    On a side note I tried to install french language using executable file and the /silent option and it's not working so I had to use the command line 7zip to unpack the files into the languages folder.

    Thanks !

    #2
    I have the same problem. Any idea?

    I'm using WinRAR auto-extract with a .bat to unpack the files into the languages folder.

    Comment


      #3
      That's what I ended doing, extracting the language file via 7zip command line, I had set the option I wanted for irfanview on a test computer and then copied the i_view32.ini to my setup dir after that I use the same batch file that extract to language file to replace the i_view32.ini in the "%ProgramFiles(x86)%\IrfanView" folder and now the default setting are set to french in irfanview. that is what my i_view32.ini file looks like
      [Language]
      DLL=French
      Lang=Francais
      [Toolbar]
      Skin=Samuel_16.png
      Size=16
      [Viewing]
      FitWindowOption=5
      Last edited by cividan; 05.01.2012, 02:37 PM.

      Comment


        #4
        I did that before, but didn't work, maybe I was do something wrong.
        Code:
        [Language]
        DLL=SPANISH
        Lang=Spanish
        ...
        I will try with this, because you use "DLL=French" and "Lang=Francais":
        Code:
        [Language]
        DLL=Spanish
        Lang=EspaƱol
        ...
        Thanks for your support. If it works, I post it.

        EDIT:
        I tried with a lot of combinations without success:
        Code:
        DLL=Spanish
        Lang=EspaƱol
        -
        DLL=SPANISH
        Lang=EspaƱol
        -
        DLL=Spanish
        Lang=Espanol
        -
        DLL=SPANISH
        Lang=Espanol
        If I choose Spanish in Irfanview->Options->Change language the i_view32.ini file continues with DLL=ENGLISH and Lang=English. So weird!
        Last edited by huleeyo; 06.01.2012, 06:35 AM.

        Comment


          #5
          Hi,

          Windows Vista and 7 is different to Windows XP. Usually you should have a simple .ini file in the program files folder of Irfan View ("C:\Program Files (x86)\IrfanView\i_view32.ini"):
          Code:
          [Others]
          INI_Folder=%APPDATA%\IrfanView
          This means the user version of the i_view32.ini file is stored in the folder "%APPDATA%\IrfanView" which is - using Windows 7 x64 - this one:
          C:\Users\<username>\AppData\Roaming\IrfanView

          So you should place the modified file there.
          If you like to set a default file for new users you should create and use this folder:
          C:\Users\Default\AppData\Roaming\IrfanView
          The folder "C:\Users\Default" is copied when a new user logs in.

          For existing users it is not easily possible to create this special entry since you need a logic which has access to all user folders and you need to copy it there.

          If you modify the i_view32.ini in the program files folder Windows will do something very special. A user is usually not allowed to modify files in the program files folder and sub folders. So the system redirects the files to an other folder:
          C:\Users\<username>\AppData\Local\VirtualStore\Pro gram Files (x86)\IrfanView
          And also if a program is started and loads data it is first checked if there is a redirected folder in this virtual store. This is weird since if you go to the Windows Explorer and navigate to the original folder you will see the original file, also you can open the .ini and see the old entries.

          So be carefull to have the correct .ini file in the program files folder and modify a new one for the users in the Roaming folder:
          C:\Users\<username>\AppData\Roaming\IrfanView

          Regards
          Nils

          Comment


            #6
            Yeah I forgot about that, but on my test machine with original manual install I did took the settings from the ini in the user folder I think, but I still overwrite the program files folder ini with my custom one and it works for me and the user can change settings if they want (at least I think but can't confirm right now) but I didn't checked the program files ini file after the user change as long as it works as expected that's ok for me.

            Comment


              #7
              @derniwi:
              Thank you very much! It's clear now.

              I was remplacing a incorrect file. Now I Know where I should do test it (...VirtualStore\Program Files (x86)\IrfanView).

              @cividan:
              Thank you for the information and thanks for your support.


              Regards.

              Comment


                #8
                @huleeyo:
                I think the VirtualStore is possible but the wrong place.

                The current Windows version use this as a method to work like older versions (XP, 2000), where a lot of users are local administrators.
                The better way is to redirect from the program files to the roaming folder (also for future windows versions):
                C:\Users\Default\AppData\Roaming\IrfanView

                Regards
                Nils

                Comment


                  #9
                  Hi everyone, I did a little batch for WinXP, WinVista and Win7 x86 and x64 to change the languaje.

                  I tested it in Win7 x64. This is the code:

                  Code:
                  @echo off
                  copy /Y "%TEMP%\Spanish.dll" "%PROGRAMFILES%\IrfanView\Languages"
                  copy /Y "%TEMP%\Spanish.dll" "%PROGRAMFILES(x86)%\IrfanView\Languages"
                  copy /Y "%TEMP%\i_view32.ini" "%PROGRAMFILES%\IrfanView\"
                  copy /Y "%TEMP%\i_view32.ini" "%PROGRAMFILES(x86)%\IrfanView\"
                  copy /Y "%TEMP%\i_view32.ini" "%APPDATA%\IrfanView"
                  copy /Y "%TEMP%\i_view32.ini" "%userprofile%\AppData\Local\VirtualStore\Program Files\IrfanView"
                  copy /Y "%TEMP%\i_view32.ini" "%userprofile%\AppData\Local\VirtualStore\Program Files (x86)\IrfanView"
                  del "Spanish.dll"
                  del "i_view32.ini"
                  del "Idioma.bat"
                  I compressed Spanish.dll, Idioma.bat and i_view32.ini (previously modified) with WinRAR with this comment:
                  Code:
                  Path=%temp%
                  SavePath
                  Silent=1
                  Setup=%temp%\Idioma.bat
                  Overwrite=1
                  *You should run as administrator.

                  Regards!
                  Last edited by huleeyo; 14.01.2012, 04:46 PM.

                  Comment


                    #10
                    @huleeyo:
                    You may have a look at my script skeleton. So you should be able to detect the current OS.

                    Comment

                    Working...
                    X