Shell.TimeOut

From Xojo Documentation


Property (As Integer )
aShell.TimeOut = newIntegerValue
or
IntegerValue = aShell.TimeOut

Supported for all project types and targets.

The time (in milliseconds) that specifies how long a process can run before it is automatically terminated (Windows only). The default is 2000 or 2 seconds. Use -1 to indicate no timeout.

Notes

Timeout is only used on Microsoft Windows.

Example

Var s As New Shell
s.ExecuteMode = Shell.ExecuteModes.Synchronous
s.TimeOut = 10000

s.Execute("DIR")

Select Case s.ExitCode
Case -2
'the command timed out
Case 0
'the command succeeded
Else
'Something else happened
End Select