Archive: ExecWait without the Dos Window


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 ?


If ExecWait is working for you, try ExecDos::exec. I have used that command to run all sorts of command line things with no dos window pop up. You will need the plug in of course, you can get it here: http://nsis.sourceforge.net/ExecDos_plug-in

Hope this helps.
Jnuw


nsExec waits started (a) process to exit. The only confusing situation is third process (b) executed by process (a) started from nsExec :) ExecWait might wait console window to close. Try ExecCmd plug-in, or use comSpec http://forums.winamp.com/showthread....hlight=comspec in the command line.