Import-Registry

Extends the registry with a reg- or regx-file. Existing entries in the registry are updated.

Note: The .regx file format is an XML-based proprietary file format used for registry extensions. It is used when converting .nir files from DSM because they contain more information (e.g. variables) than is possible in standard .reg files. You can also manually create and edit .regx files, which can then also contain extended information.


The file name extension regx prevents the registry from being accidentally modified by double-clicking in Explorer, as otherwise the variables would not be converted to their real values. The registry would be corrupt.

Note: Starting with version 3.0 of the PPB, the Import-Registry command can also be generated by dragging and dropping Registry files (*.nir, *.reg and *.regx) into the script window. If the files are already in the package directory, the source path is referenced relatively with .\, if the source files are outside the package directory, the full path is taken.


Settings:

  • Registry file
    Specifies the path included in the .reg- or .regx-file. Variables are allowed. Use the "..." button to select an existing file (on the packaging system) or enter the path manually. You can also create a new .reg- or .regx-file by entering the name manually and then clicking on "Edit File...".

Note: You can use .\ in the path for the current package directory as usual.

  • Use 32-Bit mode on x64 computer
    If the script runs on a 64-bit operating system, referencing the HKEY_LOCAL_MACHINE\SOFTWARE key allows the 32-bit application counterpart HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node to be used automatically.


Example:

The following example adds the information contained in the Standard.regx file to the local registry at runtime. Since it is a regx file, variables and expressions are evaluated before being entered in the Windows registry. If the file does not yet exist in the Files subdirectory of the package directory, you can create it with "Edit file...".


Corresponds to DSM eScript commands:

  • RegLoad
  • RegLoadEx


See also: