Configuring the Windows Session-based CLI adapter
In a Windows environment, the Session-based CLI adapter opens a sub-shell. Subsequent commands execute in the sub-shell in a session. You can specify the command at the command level or at the command-group level.
The console prompt appears when the system is waiting for a command. This prompt indicates that a command has been executed.
The following table describes the configuration node elements for the Windows Session-based CLI adapter.
Configuration node elements of the Windows Session-based CLI adapter
The following figure shows a sample configuration of the Windows Session-based CLI adapter.
XML sample of the Session-based CLI adapter configuration for Windows
<config>
<initial-command>
<command prompt="c:\directory>">cmd.exe</command>
</initial-command>
<character-set>Shift_JIS</character-set>
<prompt>></prompt>
<verify-os>false</verify-os>
<env-variables>
<env-variable>
<name>AddAndThenDelete_Name</name>
<value>AddAndThenDelete_Value</value>
</env-variable>
<env-variable>
<name>AddVariable_Name</name>
<value>New_AddVariable_Value</value>
</env-variable>
<env-variable>
<name>AddAndThenDelete_Name</name><!-- to delete which is recently added -->
<value/>
</env-variable>
</env-variables>
</config>
The following figure shows a sample configuration of the Windows Session-based CLI adapter to set environment variables.
XML sample of the Session-based CLI adapter configuration to set environment variables
<config/>
<env-variables>
<env-variable>
<name>New_Variable11</name>
<value>New_variable11_value</value>
</env-variable>
<env-variable>
<name>New_Variable22</name>
<value>New_variable22_value</value>
</env-variable>
</env-variables>
</config>
The following figure shows a sample configuration of the Windows Session-based CLI adapter to clear environment variables.
XML sample of the Session-based CLI adapter configuration to clear environment variables
<config>
<env-variables>
<env-variable>
<name>New_Variable11</name>
<value/>
</env-variable>
<env-variable>
<name>New_Variable22</name>
<value/>
</env-variable>
</env-variables>
</config>
The following figure shows a sample configuration of the Windows Session-based CLI with character-set.
XML sample of the Session-based CLI configuration with character-set
<config>
<initial-command>
<command prompt="c:\directory>">cmd.exe</command>
</initial-command>
<character-set>Shift_JIS</character-set>
</config>