> ## Documentation Index
> Fetch the complete documentation index at: https://rpa.bazhuayu.com/helpcenter/llms.txt
> Use this file to discover all available pages before exploring further.

# 运行DOS命令

## 指令说明

**描述：** 运行DOS命令，返回命令执行过程中的控制台输出文本

## 参数说明

<Tabs>
  <Tab title="常规">
    <img src="https://mintcdn.com/bazhuayu-rpa-docs/y7Z2TvwRJJef-uiI/helpcenter/commands/os/images/executedoscommand-01.png?fit=max&auto=format&n=y7Z2TvwRJJef-uiI&q=85&s=203d9fdd36dbcf7f56eeed123a3ce8f1" alt="运行DOS命令指令参数面板" width="648" height="341" data-path="helpcenter/commands/os/images/executedoscommand-01.png" />

    | 参数        | 说明                           |
    | --------- | ---------------------------- |
    | **DOS命令** | 输入需要执行的DOS命令/参数              |
    | **结果保存至** | 将DOS命令执行后输出的文本保存至此变量，不填写则不输出 |
  </Tab>

  <Tab title="高级">
    <img src="https://mintcdn.com/bazhuayu-rpa-docs/y7Z2TvwRJJef-uiI/helpcenter/commands/os/images/executedoscommand-05.png?fit=max&auto=format&n=y7Z2TvwRJJef-uiI&q=85&s=924f8c69abf1c41b1b43cbda45f9d3e8" alt="运行DOS命令高级参数面板" width="636" height="336" data-path="helpcenter/commands/os/images/executedoscommand-05.png" />

    | 参数       | 说明                                   |
    | -------- | ------------------------------------ |
    | **工作目录** | 指定要在哪个文件夹下启动执行DOS命令，不填写则默认是启动程序所在文件夹 |
    | **编码格式** | 读取输出时使用的编码格式，默认，UTF-8，ASCII          |
  </Tab>
</Tabs>

## 使用示例

<img src="https://mintcdn.com/bazhuayu-rpa-docs/y7Z2TvwRJJef-uiI/helpcenter/commands/os/images/executedoscommand-02.png?fit=max&auto=format&n=y7Z2TvwRJJef-uiI&q=85&s=8028f3f6af92ad14f993cd7a87459ecc" alt="运行DOS命令使用示例" width="648" height="341" data-path="helpcenter/commands/os/images/executedoscommand-02.png" />

<img src="https://mintcdn.com/bazhuayu-rpa-docs/y7Z2TvwRJJef-uiI/helpcenter/commands/os/images/executedoscommand-03.png?fit=max&auto=format&n=y7Z2TvwRJJef-uiI&q=85&s=8d6fae110513950d7385a2fbfc4da752" alt="运行DOS命令使用示例" width="857" height="113" data-path="helpcenter/commands/os/images/executedoscommand-03.png" />

**该流程执行逻辑：**

例如使用 ipconfig 指令查询主机ip信息，结果输出至变量【DOS命令执行结果】

使用【运行DOS命令】指令，生成变量【DOS命令执行结果】`{Output:......IPv6地址..........}`

常见DOS指令教学讲解

### 效果展示

<img src="https://mintcdn.com/bazhuayu-rpa-docs/y7Z2TvwRJJef-uiI/helpcenter/commands/os/images/executedoscommand-04.png?fit=max&auto=format&n=y7Z2TvwRJJef-uiI&q=85&s=3c6f7672c25b2e104b83fbbe63d55e71" alt="运行DOS命令效果展示" width="843" height="365" data-path="helpcenter/commands/os/images/executedoscommand-04.png" />

<Info>
  使用指令过程中遇到问题？前往 [八爪鱼RPA 开发者社区问答板块](https://rpa.bazhuayu.com/community/questions) 提问，获取官方与社区帮助。
</Info>
