Remember that distribution tasks are executed in the SYSTEM user context, therefore you cannot add keys/values to an employee‑user’s registry under HKEY_CURRENT_USER this way.
If you want to distribute and run .REG files on computers with Agents installed, use the distribution task feature. It allows you to upload files to Agent machines and import the registry.
Task configuration:
-
In the “Files” tab, select the files to be uploaded.
-
In the “Execution” tab, enter:
-
Command to execute:
c:\windows\system32\cmd.exe -
Parameters:
/C reg import "nazwa_pliku.reg" /reg:64
Example:
/C reg import "test2.reg" /reg:64By default, a 32‑bit process on a 64‑bit system will use the 32‑bit registry view:
HKLM\SOFTWARE\Wow6432Node
- therefore, use the correct switch.Switches:
/reg:32 forces reg.exe to write to the 32‑bit registry view
/reg:64 forces reg.exe to write to the 64‑bit registry view
More information:
-
In the “Devices” tab, select the computers (with Agents installed) on which the registry should be imported.