Use the following syntax:
${VAR_NAME}
%VAR_NAME%
%*VAR_NAME%
Replace VAR_NAME with the name of the variable.
When you perform an action on the agent, you might sometimes need to put the name of a macro into the registry, or a file, rather than the value itself. Use the following syntax in such a case:
%%username%%
The variable is written as it is and is not replaced with a value.