SetEnv & GetEnv, SetReg & GetReg: Write value to environment/Read environment value to variable
Tag: SetEnv
The self-closing tag SetEnv allows you to write:
- sapio365: a text value in a registry entry
- EZ Suite: a value in a Notes.ini entry
Tag: SetReg
The self-closing tag SetReg allows you to write a text value to the Windows registry.
In sapio365, SetEnv is an alias for SetReg.
Detailed Description
Environment variables are persisted in the registry (sapio365) or in the Notes.ini file (EZ Suite products).
They allow to exchange information between products and running instances.
Tag Attributes
Attributes | Value Description |
---|---|
Name | sapio365: Registry entry name EZ Suite: Notes.ini entry name |
Value | Value to set for the entry |
Non-notes products: Sets a variable in registry value identified by "Name" in HKEY_CURRENT_USER\SOFTWARE\Ytria\Settings\AutomationVariables
SetEnv variables are common to all applications in the Notes/non Notes realms (Notes apps write to Notes.ini, non-Notes app write to registry).
Tag: GetEnv
The self-closing tag GetEnv allows you to read:
- sapio365: a text value from a registry entry
- EZ Suite: a value from a Notes.ini entry
Tag: GetReg
The self-closing tag GetReg allows you to read a text value from the Windows registry.
In sapio365, GetEnv is an alias for GetReg.
Tag Attributes
Attributes | Value Description |
---|---|
Name | sapio365: Registry entry name EZ Suite: Notes.ini entry name |
Var | Name of the variable to assign the read value to |
Non-notes products: reads a variable from the registry entry identified by Name, then assigns its value to a script variable as if it had been defined by SetVar
Example Scripts
<SetEnv name="SetByAutomation" value="This is my value"/>
<GetEnv NaMe="SetByAutomation" Var="MyRegVar"/>
<ytriaAutomation>
<SetEnv Name="SetByAutomation" Value="sapio365, the M365 administrator’s best friend!"/>
<GetEnv Name="SetByAutomation" Var="MyRegVar"/>
<MsgBox Title="Registry test" Message="Stored in registry: {%MyRegVar%}"/>
</ytriaAutomation>
<ytriaAutomation>
<SetEnv Name="SetByAutomation" Value="sapio365, the M365 administrator’s best friend!"/>
<GetEnv Name="SetByAutomation" Var="MyRegVar"/>
<MsgBox Title="Registry test" Message="Stored in registry: {%MyRegVar%}"/>
</ytriaAutomation>
SetReg & GetReg always write & read into/from the Windows regsitry:
<ytriaAutomation>
<SetReg Name="SetByAutomation" Value="SETREG"/>
<GetReg Name="SetByAutomation" Var="MyRegVar"/>
<MsgBox Title="Registry test" Message="Stored in registry: {%MyRegVar%}"/>
</ytriaAutomation>