Foxtable(狐表)用户栏目专家坐堂 → 运行DOS命令


  共有5057人关注过本帖平板打印复制链接

主题:运行DOS命令

帅哥哟,离线,有人找我吗?
qzy
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:幼狐 帖子:104 积分:1115 威望:0 精华:0 注册:2021/8/13 23:18:00
运行DOS命令  发帖心情 Post By:2022/10/28 10:38:00 [只看该作者]

Dim mac As String = ""
Dim p As System.Diagnostics.Process = New System.Diagnostics.Process()
p.StartInfo.FileName = "nbtstat"
p.StartInfo.Arguments = "-a 192.168.1.102"
p.StartInfo.UseShellExecute = False
p.StartInfo.CreateNoWindow = True
p.StartInfo.RedirectStandardOutput = True
p.Start()
Dim ot As String = p.StandardOutput.ReadToEnd()
MessageBox.show(ot)
复制6楼的代码运行报错
图片点击可在新窗口打开查看
将p.StartInfo.FileName = "nbtstat" 改为p.StartInfo.FileName = "netstat"后运行没反应,直接卡死

 回到顶部