Actual Installer Help:

Registry

On the "System \ Registry" page you can add entries to write to the Windows Registry during your app's installation process.

NOTE: If you need to read data from Registry, use System \ Variables.

NOTE: To add registry entries from a .REG file, click the "Import" button.

Bitness

The bitness of the Windows Registry.
NOTE: On 64-bit Windows, the Registry is divided into 32-bit and 64-bit keys. The key that is used for 32-bit apps, is HKEY_LOCAL_MACHINE\Software\WOW6432Node . When accessing the key HKEY_LOCAL_MACHINE\Software from a 32-bit app, Windows will redirect it to HKEY_LOCAL_MACHINE\Software\WOW6432Node . Read more about accessing 64-bit Registry.

It is recommended to set it to Default. In this case, access to the registry depends on the selected option of the required bitness of Operating System (32 or 64-bit) on the "General \ Requirements" page. If 64-bit only is selected, Actual Installer will generate a native 64-bit setup executable file, that will access the 64-bit Registry. In other cases, the 32-bit setup file will be created that will access the 32-bit Registry.

Default
32-bit
64-bit

Registry Key

The path to the registry key.
The full registry key must be used for each entry.

The Windows Registry has two main root keys: HKEY_LOCAL_MACHINE is a key for All Users (per-machine) settings (writing to this key requires administrator privileges). HKEY_CURRENT_USER is a key for Current User (per-user) settings (administrator privileges are not required to write to this key). Read more about Installation Levels.

For root key names can be used short names (HKCU=HKEY_CURRENT_USER, HKLM=HKEY_LOCAL_MACHINE). In your Actual Installer project, you can use a special root key HKEY_DEFAULT (short HKDE) to replace it with HKEY_CURRENT_USER if the installation is for Current User; or with HKEY_LOCAL_MACHINE if the installation is for All Users. This special root key is recommended to use when "Install Product for" is set to "Ask User".

HKEY_LOCAL_MACHINE\Software\<CompanyName>\<AppName>
HKEY_CURRENT_USER\Software\<CompanyName>\<AppName>
HKCU\Software\<CompanyName>\<AppName>
HKDE\Software\<CompanyName>\<AppName>

NOTE: If use the key "HKEY_CURRENT_USER", and the setup program is elevated (using the option "Run as administrator", or the setup file is started from an elevated process, or the file is launched via Windows Explorer's menu "Run as administrator"), then the registry key of the administrator will be used. To use the key of the original user, the following conditions must be met: Interface: Modern; option "Install for" is set to "All Users" or "Ask User (All Users by default)"; option "Run as administrator" is NOT selected. In this case, the program is elevated on the Install button click.

NOTE: If use the key "HKEY_LOCAL_MACHINE", and the setup program is not elevated (does not have administrator privileges), then this key will be automatically redirected to the "HKEY_CURRENT_USER" key. To disable this feature, add -noChangeRootKey to Setup Parameters (note that this may result in "Access Denied" error). To suppress the Registry error messages, add parameter -IgnoreRegistryWriteErrors .

Registry Value

The name of the registry value. Leave blank to use the (Default) value.

Version
InstallPath

Value Type

The type of the registry value.

REG_SZ
REG_EXPAND_SZ
REG_DWORD
REG_BINARY

Value Data

Data that will be written to the registry value.

<InstallDir>

Overwrite if exists

If selected, the registry value will be overwritten if it already exists.

Remove on uninstall

If selected, the registry value (or key, if it was created) will be deleted during uninstallation.
Note: To not remove the registry key during uninstallation (if it was created during installation), add -RegNoRemoveCreatedKey to Setup Parameters.


Examples:

#1 - Save the installation directory (stored in the variable <InstallDir>) to the Registry:

Registry Key: HKEY_CURRENT_USER\Software\<CompanyName>\<AppName>
Name Value: InstallDir
Type Value: REG_SZ
Value Data: <InstallDir>			

#2 - Ask the user for Password or Key and write it to Registry