Setup.exe 参数在 VB.NET
Setup.exe with arguments in VB.NET
我不知道如何开始 setup.exe
任何参数。
实际上尝试了这段代码,但出了点问题:
Dim p As New ProcessStartInfo
p.FileName = Application.StartupPath & "\Content\Office13_ALL\x86\setup.exe"
p.Arguments = Application.StartupPath & "\Content\Office13_ALL\x86\setup.exe" & "/configure .5HomePrem86.xml"
p.WindowStyle = ProcessWindowStyle.Normal
Process.Start(p)
如果您有修复它的想法,请告诉我!
我想这样开始 setup.exe(.bat 文件):
start setup.exe /configure .5HomePrem86.xml
试试下面的方法。您不需要 Arguments() 属性 中 setup.exe 的完整路径...只需给它 arguments。有时您还需要设置 WorkingDirectory() 才能使应用正常工作:
Dim p As New ProcessStartInfo
p.FileName = Application.StartupPath & "\Content\Office13_ALL\x86\setup.exe"
p.WorkingDirectory = System.IO.Path.GetDirectoryName(p.FileName)
p.Arguments = "/configure .5HomePrem86.xml"
p.WindowStyle = ProcessWindowStyle.Normal
Process.Start(p)
我不知道如何开始 setup.exe
任何参数。
实际上尝试了这段代码,但出了点问题:
Dim p As New ProcessStartInfo
p.FileName = Application.StartupPath & "\Content\Office13_ALL\x86\setup.exe"
p.Arguments = Application.StartupPath & "\Content\Office13_ALL\x86\setup.exe" & "/configure .5HomePrem86.xml"
p.WindowStyle = ProcessWindowStyle.Normal
Process.Start(p)
如果您有修复它的想法,请告诉我!
我想这样开始 setup.exe(.bat 文件):
start setup.exe /configure .5HomePrem86.xml
试试下面的方法。您不需要 Arguments() 属性 中 setup.exe 的完整路径...只需给它 arguments。有时您还需要设置 WorkingDirectory() 才能使应用正常工作:
Dim p As New ProcessStartInfo
p.FileName = Application.StartupPath & "\Content\Office13_ALL\x86\setup.exe"
p.WorkingDirectory = System.IO.Path.GetDirectoryName(p.FileName)
p.Arguments = "/configure .5HomePrem86.xml"
p.WindowStyle = ProcessWindowStyle.Normal
Process.Start(p)