获取环境变量
<h1>功能</h1>
<p>获取指定环境变量的内容。</p>
<h1>输入</h1>
<table>
<thead>
<tr>
<th>名称</th>
<th>说明</th>
<th>示例</th>
</tr>
</thead>
<tbody>
<tr>
<td>变量[*]</td>
<td>[string]自定义,要检索其值的环境变量的名称。</td>
<td>ComSpec</td>
</tr>
</tbody>
</table>
<h1>输出</h1>
<table>
<thead>
<tr>
<th>名称</th>
<th>说明</th>
<th>示例</th>
</tr>
</thead>
<tbody>
<tr>
<td>变量值</td>
<td>[string]自定义,所选环境变量的值,创建输出变量。</td>
<td>变量</td>
</tr>
</tbody>
</table>
<h1>注意/说明</h1>
<p>无</p>
<h1>相关函数</h1>
<p>日志消息</p>
<h1>示例/演示</h1>
<p>获取“ComSpec”环境变量的值
<img src="https://www.showdoc.com.cn/server/api/attachment/visitfile/sign/27560736f2aa800f4e2d6d0fd35e48a3" alt="" />
获取结果如图:
<img src="https://www.showdoc.com.cn/server/api/attachment/visitfile/sign/833c04058737320b8d12333a20aaa3b6" alt="" /></p>
<h1>示例附件</h1>
<p><a href="https://www.showdoc.com.cn/server/api/attachment/visitfile/sign/495597a7afcbe789e78aaa70faf69ce3" title="[组件[获取环境变量]_20210601.db">组件[获取环境变量]_20210601.db</a></p>