waitforsingleobject

How to wait for a shell process to finish before executing further code in VB6

醉酒当歌 提交于 2019-11-27 01:59:07
I have a small VB6 app in which I use the Shell command to execute a program. I am storing the output of the program in a file. I am then reading this file and putting the output on the screen using a msgbox in VB6. This is what my code looks like now: sCommand = "\evaluate.exe<test.txt " Shell ("cmd.exe /c" & App.Path & sCommand) MsgBox Text2String(App.Path & "\experiments\" & genname & "\freq") The problem is that the output which the VB program is printing using the msgbox is the old state of the file. Is there some way to hold the execution of the VB code until my shell command program

How to wait for a shell process to finish before executing further code in VB6

为君一笑 提交于 2019-11-26 09:52:27
问题 I have a small VB6 app in which I use the Shell command to execute a program. I am storing the output of the program in a file. I am then reading this file and putting the output on the screen using a msgbox in VB6. This is what my code looks like now: sCommand = \"\\evaluate.exe<test.txt \" Shell (\"cmd.exe /c\" & App.Path & sCommand) MsgBox Text2String(App.Path & \"\\experiments\\\" & genname & \"\\freq\") The problem is that the output which the VB program is printing using the msgbox is