我是 Visual Basic 新手。我正在使用 VB Premium 2012。
有没有一种方法可以使用参数打开/启动 exe
文件(不是我的应用程序)。我知道我们可以使用 echo
和其他东西在批量编码中完成。可以用vb做吗?
我想打开“app.exe
”,参数为“-login usernamehere passwordhere
”
最佳答案
试试这个
Dim pHelp As New ProcessStartInfo
pHelp.FileName = "YourApplication.exe"
pHelp.Arguments = "parameter1,parameter2"
pHelp.UseShellExecute = True
pHelp.WindowStyle = ProcessWindowStyle.Normal
Dim proc As Process = Process.Start(pHelp)
希望对你有帮助...
关于vb.net - 如何启动带参数的exe,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12684915/