Menu

WinRAR.ini file


By default WinRAR stores settings in Registry. Such approach is reasonable when WinRAR is installed and used on the same single computer. But if you plan to install WinRAR on removable media, such as USB flash drive, and then run it on different computers occasionally, you may prefer to avoid storing any WinRAR specific data in Registry on those computers.

It is possible to redirect WinRAR Registry access to text file. If you create an empty WinRAR.ini file either in the same folder as WinRAR.exe or in %APPDATA%\WinRAR folder, WinRAR will redirect access to HKEY_CURRENT_USER\Software\WinRAR and HKEY_LOCAL_MACHINE\Software\WinRAR Registry keys to this file. WinRAR searches for this file first in its own folder and next in %APPDATA%\WinRAR.

Use "Create WinRAR.ini file" command in "Import and export" submenu to create a new WinRAR.ini file and copy existing WinRAR settings from Registry to this file. You need to copy a file created with this command either to WinRAR own folder or to %APPDATA%\WinRAR to make it active.

Typically current settings are written to WinRAR.ini only on exit, until that they are stored in memory. They are saved as case sensitive UTF-16LE text strings in following format:

<root key>\<key name>=value

where <root key> can be HKCU for HKEY_CURRENT_USER, HKLM for HKEY_LOCAL_MACHINE and Global for global settings added by user manually. String values are enclosed in quote marks and byte arrays have "bin:" prefix.

You can change global settings to control WinRAR.ini behavior. If write access to WinRAR.ini is not disabled, WinRAR creates strings listed below automatically and you need to edit a parameter after "=" to change an option. These strings are created at the top of WinRAR.ini. If you are going to disable write access with read-only attribute, you may need to add an appropriate string to WinRAR.ini manually before setting the read-only attribute, one command per line. All these strings use UTF-16LE encoding and are case sensitive, enter them exactly as mentioned here. Following global settings are available:


Global\AppData=0

Prohibit WinRAR to access APPDATA%\WinRAR folder. All files normally stored in this folder, such as registration key or interface themes, should be stored in the same folder as WinRAR.exe if Global\AppData=0 is specified. Specify Global\AppData=1 to allow access to APPDATA%\WinRAR.


Global\Integration=0

While WinRAR redirects its branches of HKEY_CURRENT_USER and HKEY_LOCAL_MACHINE Registry keys to WinRAR.ini, it still writes data to HKEY_CLASSES_ROOT and other parts of Registry required to properly set the shell extension and file associations. For example, it happens when using Integration settings dialog. If you wish to prohibit any operations with Registry, add Global\Integration=0 to WinRAR.ini. WinRAR will not be able to change system integration settings after that. This command also prohibits creating or deleting WinRAR shortcut on Desktop and WinRAR program group. Specify Global\Integration=1 to allow system integration.


Global\SaveSettings=0

Disable writing current settings back to WinRAR.ini, so any configuration changes made in current WinRAR copy will be lost on exit. You can achieve the same result by setting read-only attribute to WinRAR.ini file. It is reasonable to configure WinRAR as you wish first, close WinRAR to store settings to file and only then add Global\SaveSettings=0 command. This mode may also affect other WinRAR components relying on WinRAR.ini, such as the shell extension not seeing changes in Context menu items dialog. Specify Global\SaveSettings=1 to allow saving settings to WinRAR.ini.


Notes

  • Unlike other Registry variables, "AppData" variable is not redirected to WinRAR.ini and always read from Registry. This variable defines location of %APPDATA%\WinRAR folder and since WinRAR.ini can be stored in this folder, we need to know a value of this variable before accessing WinRAR.ini.
  • If winrar.ini is present in the same folder as WinRAR installer .exe file and its earlier version is not available, winrar.ini will be copied to proper WinRAR folder after completing installation.