Module ExecProcessManager Friend Function ExecProcess(sFileName As String, sMainLuaPath As String, sArguments As String) As Boolean ' lancio esecuzione programma Dim bResult As Boolean = True Dim Proc As New Process() Proc.StartInfo.FileName = sFileName Proc.StartInfo.RedirectStandardInput = False Proc.StartInfo.RedirectStandardOutput = False Proc.StartInfo.Arguments = 1.ToString() & " """ & sMainLuaPath & """ """ & sArguments & """" Proc.StartInfo.UseShellExecute = False Proc.StartInfo.CreateNoWindow = True Dim ExecCounter = 0 If Proc.Start Then While Not Proc.HasExited If ExecCounter >= 300 Then bResult = False Proc.Kill() Exit While End If Threading.Thread.Sleep(100) ExecCounter += 1 End While End If Return bResult End Function End Module