在 vb.net 中运行批处理文件? [英] Run batch file in vb.net?

查看:48
本文介绍了在 vb.net 中运行批处理文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何从 vb.net 中运行批处理?

How can I run a batch from from within vb.net?

推荐答案

您可以使用 Process 类来运行批处理文件

You can use the Process class to run a batch file

Dim psi As New ProcessStartInfo("Path TO Batch File")
psi.RedirectStandardError = True
psi.RedirectStandardOutput = True
psi.CreateNoWindow = False
psi.WindowStyle = ProcessWindowStyle.Hidden
psi.UseShellExecute = False

Dim process As Process = Process.Start(psi)

这篇关于在 vb.net 中运行批处理文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆