Kaseya Community

Populating custom fields through agent procedure

  • I am working through the Kaseya training videos. One of them showed me how to create custom fields and mentioned that populating the values through an agent procedure would be covered in another video. Unfortunately, I cannot find that video.

    I would like to take the value of a particular registry key (hklm\system\currentcontrolset\control\deploymentengineer, which is a REG_SZ) and place it into custom field 0 (which I have called "DeploymentEngineer")

    How would I do that? Thanks.

  • Use the UpdateSystemInfo() statement in your agent procedure.  There's a dropdown to select all of the available fields you can update.

    Bonus tip:  Make sure your custom field exists before you create/modify the procedure.  It won't appear in the dropdown if you create it after you've opened the procedure.

  • Use the getVariable to find your registry value and assign it to a variable name.  Then use the updateSystemInfo selecting your custom field and put your variable as your value for the field.  Your resulting procedure lines would look something like this.  

    getVariable("Registry Value",  "hklm\system\currentcontrolset\control\deploymentengineer", "deploymentengineer", "All Operating Systems", "Halt on Fail")

    updateSystemInfo("DeploymentEngineer", "#deploymentengineer#", "All Operating Systems", "Halt on Fail")

    If dealing with a 64bit OS you'll need to use the 64-Bit Registry Value option when assigning your variable.

  • Hi  

    You can update custom fields in Agent Procedures using the step 'UpdateSystemInfo'.

    Below is an example;

  • Thanks, I wasn't seeing my custom field yesterday. When I logged in today, I saw it, so I figured out that you need to re-load the procedure editing window to see new fields.

    Working great.