A new extension was submitted for those situations where you need to update the ScreenConnect server with a variable or information that can be stored in a variable from the remote machine. When first building the access installer, it is possible to do so using a variable within the Access Installer Builder's fields, which will work for Windows Vista and newer OSes, and Windows XP if you side-load SETX. However, this information will not be updated on the server after the initial check-in by the client, and cannot be obtained thereafter if it wasn't set in a variable at the time of installation.
To work around these, I wrote an extension that uses the commands feature to gather the variables from the remote machine, and allow them to be saved into the Session Name, or any of the 8 Custom Properties. For more information on
editing session details manually and
enabling custom fields/properties for sessions on our
Help Site.
To install the extension, use the Online Extension Browser to find and install the "Set Session Properties From System Variables" extension and install it. Note: At the time this is written, it has been submitted for publication, but is not yet published.
Once installed, you should see this on your Admin/Extensions Tab:

By default, the extension has no settings defined. You will need to define at least one session variable name to use for the extension to work. There are three ways to access the Extension Settings. The first is through the Options > Edit Settings menu on the extension on the Extensions Tab:

If logged in as an Administrator, it can also be accessed from the Host page by Selecting the "Update Properties from Variables" option when right-clicking a session, or from the More menu when no settings are defined. If the settings are defined, this instead will run the extension. This is useful so attempting to run it without settings in place, it will prompt you to provide them. You can also right click the "Update Properties from Variables" link in the context menu or under "More..." to bring up the Edit Extension Settings menu at any time.

If a non-administrator attempts to run this while it is not setup, they will get prompted to contact their ScreenConnect Administrator for assistance:

Once the settings menu is open, you can provide a variable name in "SessionNameVariableName" or any of the 8 "CustomProperty#VariableName" Keys and that will be the environment variable used to populate the session.

It will use the same variable names for Windows, Mac, Linux and Android devices, so please pick them carefully. Also, do not use any formatting on the variable names to identify them as variables in most cases, so no need to encapsulate the name with percent signs for windows or prefix them with dollar signs for Mac/Linux/Powershell. For example, if you wanted to get the 'computername' variable, you would simply enter "computername" in the desired field.

To help facilitate differences between operating systems, and to allow setting variables on the fly when this extension is run, you can also specify the Command Interpreter, a "Pre" command, which is run before the variable values are pulled, and a "Post" command, which will be run thereafter in case any clean up is necessary. The Extension Settings editor for this extension has been modified to allow Text Area type fields for these command entries to facilitate multi-line commands (script-style).

Once the "Update Properties from Variables" command is selected for one or more sessions, it will send a command to those remote machines. This will happen in the logged on user's context, so be sure they have the "RunCommandOutsideSession" permission to be able to run this. If they do not have this permission, the option will be grayed out.

Also note, the default permissions for the "Host" role does not include the option to Run Commands Outside Session for access sessions (requires "OwnedAndUnowned" to work with Access Sessions).
The command and response, for the "computername" would send and recieve commands that look like this:

In another example, I set the following:
SessionnameVariableName: computername
CustomProperty1VariableName: scvar1
CustomProperty2VariableName: scvar2
CustomProperty3VariableName: novalue
WindowsCommandInterpreter: ps
UseEnvironmentVariablesInPowershell: false
WindowsPreCommand:
Code:$computername=$env:computername
$scvar1 = "Hello World"
$scvar2 = (wmic path win32_videocontroller get name)
It sent the following:

And this was the return:

Resulting in a Session with the following info (Organization = CustomProperty1, Words = CustomProperty2):

A few notes with this, I set the "ps" for the interpreter to use Powershell on Windows. Next I set the "UseEnvironmentVariablesInPowershell" to false, otherwise each variable would have been prefixed with a "env:" which pulls environment variables, as opposed to temporary variables for the session. I did so because I wanted to use other variables on the session that were not environment variables.
I also set the code in the WindowsPreCommand to set the variables as needed, loading the comptuername environment variable into the computername local PS variable, set scvar1 to a set string, and scvar2 to the output of a command. Note that the command, if run directly, provides multi-line output, but in this case, since it is going into a variable, only provides a single line - necessary for this extension to work. If the number of lines of output does not meet the number of variables it expects to write, the session properties will not be updated, but the name will have an error message appended to it to let you know the command didn't complete successfully.
Note that for the third CustomProperty I set it to a variable that does not have a value set, this will clear out the CustomProperty on the server, which before this was run set to "Testing". If you do not specify a variable name in the settings for the SessionName or any of the Custom Properties, it will note update or clear them out, leaving them as they exist before the command is run.