Public Function ExecuteShell(ByVal ExeFile As String, ByVal Paras As String) As Integer
If ExeFile.Trim = "" Then Return -1
Dim newProc As Diagnostics.Process
Try
newProc = Diagnostics.Process.Start(ExeFile, Paras)
newProc.WaitForExit()
Return newProc.ExitCode
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Information)
Return -1
End Try
End Function
If ExeFile.Trim = "" Then Return -1
Dim newProc As Diagnostics.Process
Try
newProc = Diagnostics.Process.Start(ExeFile, Paras)
newProc.WaitForExit()
Return newProc.ExitCode
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Information)
Return -1
End Try
End Function