﻿功能:cmd命令行执行函数

格式:cmd(coment1,coment2,……)

说明:按顺序依次执行coment1,coment2,……。每个命令以逗号分隔。其中执行完毕后依次返回在Dos命令下对应的结果。

注意:【不是很重要】本函数执行后,系统的命令弹出窗口会暂时变得不可用,目前由于还没有找到怎么通过代码来解决这个问题,你可以输入一个错误的数据或者一个双引号来解除这个限制

例子:
//假如我们要ping www.baidu.com以及想使用命令ipconfig/all看下我们的Mac地址,则我们可以用如下的命令来实现

cmd(ping www.baidu.com,ipconfig/all)//按回车后显示如下的结果
Microsoft Windows XP [版本 5.1.2600]
(C) 版权所有 1985-2001 Microsoft Corp.
Cmd:>ping www.baidu.com
Ping request could not find host www.baidu.com. Please check the name and try again.
Cmd:>ipconfig/all
Windows IP Configuration
        Host Name . . . . . . . . . . . . : MICROSOF-FA3CF9
        Primary Dns Suffix  . . . . . . . : 
        Node Type . . . . . . . . . . . . : Mixed
        IP Routing Enabled. . . . . . . . : No
        WINS Proxy Enabled. . . . . . . . : No
Ethernet adapter 本地连接:
        Connection-specific DNS Suffix  . : 
        Description . . . . . . . . . . . : Realtek RTL8139 Family PCI Fast Ethernet NIC
        Physical Address. . . . . . . . . : 00-23-AE-00-05-85
        Dhcp Enabled. . . . . . . . . . . : Yes
        Autoconfiguration Enabled . . . . : Yes
        Autoconfiguration IP Address. . . : 169.254.205.44
        Subnet Mask . . . . . . . . . . . : 255.255.0.0
        Default Gateway . . . . . . . . . : 
Ethernet adapter 无线网络连接:
        Media State . . . . . . . . . . . : Media disconnected
        Description . . . . . . . . . . . : Dell Wireless 1395 WLAN Mini-Card
        Physical Address. . . . . . . . . : 00-23-4D-D5-39-E7
Cmd:>exit