ExecWait without the Dos Window
I was using nsexec::ExecToStack to run command lines during my setup, then in the next step I was pushing variables into the stack and calling functions, and I was getting the output of the command line within the function I called:
For example in the following script, I get the output of the
"iisreset /stop" command in my messagebox.
I know that if I were using $2 for example to store my string I would have avoid this problem, but is there a way to force ExecToStack to wait until the execution is done ?
I know I can provide it with a timeout but sometimes it will take a few seconds somteimes 1 minute and I don't want to wait for the worth case scenario.
Function func1
Pop $0
MessageBox MB_OK "$0"
FunctionEnd
nsExec::ExecToStack 'iisreset /stop'
StrCpy $0 "some text"
Call func1
Then if I replace nsExec::ExecToStack with ExecWait, it is doing exactely what I need, but a Dos window is displayed. Is it possible to hide it ?
Do you have any suggestions ?