Skip to main content
Skip table of contents

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

AttributesValue 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

Registry edition Set By Automation

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

AttributesValue Description
Name

sapio365: Registry entry name

EZ Suite: Notes.ini entry name

VarName 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

XML
<SetEnv name="SetByAutomation" value="This is my value"/>
XML
<GetEnv NaMe="SetByAutomation" Var="MyRegVar"/>
XML
<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>
XML
<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:

XML
<ytriaAutomation>	
    <SetReg Name="SetByAutomation" Value="SETREG"/>
    <GetReg Name="SetByAutomation" Var="MyRegVar"/>
    <MsgBox Title="Registry test" Message="Stored in registry: {%MyRegVar%}"/>
</ytriaAutomation>
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.