Real Software Forums
http://forums.realsoftware.com/

TimeOut Shell
http://forums.realsoftware.com/viewtopic.php?f=21&t=42692
Page 1 of 1

Author:  sberla [ Wed Feb 15, 2012 6:02 am ]
Post subject:  TimeOut Shell

I have a problem when running a dos application using shell, being that the application dos is very laborious as timing, the program times out. I tried to set the Timeout to -1, but in doing so the Dialog window is blocked while the application does not end the calculation.

I would like some suggestions, kind regards

my code:

Dim path as string
Dim bash as New Shell
path = "cmd.exe /c Appdos.exe"
bash.TimeOut = -1
bash.Mode = 0
App.DoEvents(500)
bash.Execute path
msgbox "done"


If instead imposed timeout 5000 the bash variable returns immediately timeout

Author:  J.Hansen [ Wed Feb 15, 2012 7:09 am ]
Post subject:  Re: TimeOut Shell

sberla wrote:
I have a problem when running a dos application using shell, being that the application dos is very laborious as timing, the program times out. I tried to set the Timeout to -1, but in doing so the Dialog window is blocked while the application does not end the calculation.

I would like some suggestions, kind regards

my code:

Dim path as string
Dim bash as New Shell
path = "cmd.exe /c Appdos.exe"
bash.TimeOut = -1
bash.Mode = 0
App.DoEvents(500)
bash.Execute path
msgbox "done"


If instead imposed timeout 5000 the bash variable returns immediately timeout


The option /c will terminate shell after the command has been executed. Try to use /k instead (Windows 7 environment)
path = "cmd.exe /k Appdos.exe"


For more options enter: cmd.exe /? in a dos window

Page 1 of 1 All times are UTC - 5 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/