2010年12月21日 星期二

Process Start

來源處

Module Module1
Sub Main()
' One file parameter to the executable
Dim sourceName As String = "ExampleText.txt"
' The second file parameter to the executable
Dim targetName As String = "Example.gz"

' New ProcessStartInfo created
Dim p As New ProcessStartInfo

' Specify the location of the binary
p.FileName = "C:\7za.exe"

' Use these arguments for the process
p.Arguments = "a -tgzip """ & targetName & """ """ & sourceName & """ -mx=9"

' Use a hidden window
p.WindowStyle = ProcessWindowStyle.Hidden

' Start the process
Process.Start(p)
End Sub
End Module

沒有留言:

張貼留言