是否通过vb.net打开其他应用程序?

是否通过vb.net打开其他应用程序?,vb.net,visual-studio-2010,Vb.net,Visual Studio 2010,通过vb.net打开其他应用程序的正确代码是什么 Module OpenZone Sub Main() OpenZoneServer("C:\Users\Andre Pabertiyan\Desktop\") End Sub Private Sub OpenZoneServer(ByVal f As String) Dim startInfo As New ProcessStartInfo startInfo.FileName = "DZoneModule.exe"

通过vb.net打开其他应用程序的正确代码是什么

Module OpenZone
Sub Main()
    OpenZoneServer("C:\Users\Andre Pabertiyan\Desktop\")
End Sub

Private Sub OpenZoneServer(ByVal f As String)
    Dim startInfo As New ProcessStartInfo
    startInfo.FileName = "DZoneModule.exe"
    startInfo.Arguments = f
    Process.Start(startInfo)
End Sub
End Module

如果此代码正确,我如何将此代码调用到主程序中?

f
是应用程序的路径还是真正的参数

例如,参数是
/f
/d
或应用程序支持的任何参数。一些应用程序也可能支持文件或目录的路径作为参数。但是,您的路径包含一个空格,该空格很可能会将参数一分为二,因此不受支持。要解决此问题,请在路径周围加括号(必须转义):

如果您指的是应用程序的路径:

startInfo.FileName = f & "DZoneModule.exe"
使用Shell()函数调用特定的可执行文件。 例如:

shell("C:\Windows\System32\calc.exe")

我使用shell()但当我想在桌面上打开其他程序时,它是无用的。。。我像这个shell一样使用(“C:\Users\Andre\Desktop\DZoneModule.exe”),很好,工作正常。e、 我有一个.exe文件。我尝试了以下方法:Shell(“C:\Users\Mahadev\Desktop\Windows7 USB DVD下载工具安装程序en US.exe”),它工作得非常好。或者,如果您想在Shell()中使用快捷方式,请转到该快捷方式文件的属性,复制目标文本并粘贴到Shell()中,程序将运行外部可执行文件。
shell("C:\Windows\System32\calc.exe")