Archive: Exec an exe and show a message until the app finishes


Exec an exe and show a message until the app finishes
Hi all,

I need from my installer to run an exe. I use Exec or ExecWait and is doing what I need, but it shows the window of the application that I run, so in this case a ugly command prompt window :)

Can I somehow do the following:
- run myapp.exe with it's windows hidden
- while this one runs, show a msg like "Doing smth, pls wait ..."
?

So, something like:


ShowMsg "Doing smth, please wait ..." TRUE ;puts a msg on the screen
ExecWait myapp.exe ;runs myapp.exe and waits to finish
ShowMsg "" FALSE ;removes the msg from the screen


Would this be possible?
Thx,
Viv

I was able to actually find the answer in the forum, so I used the nsExec::Exec for this and seems is doing what I need.

Still 2 questions related to this subject:

1) In the docu is not written but as my tests show the nsExec::Exec waits (always) for the run exe to finish. Is this assumption correct?
2) Is there a way to run also Windows application with this and get them hidden or this will work only on console app? Is there smth that can be used to hide any window shown by the run application regardless if this is a console or a windows?

Thanks,
Viv


To print a custom message, use DetailPrint. To suppress the message from ExecWait, use SetDetailsPrint.

nsExec will only hide the output of command line applications.


Thanks kichik for your answer. Can you also answer this one please: In the docu is not written but as my tests show the nsExec::Exec waits (always) for the run exe to finish. Is this assumption correct?

Thanks,
Viv


Yes, nsExec always waits.


I guess banner plug in is what you're looking for


I was trying to use nsExec for something similar:
I want to run the installation for the Java VM in my installer.

The thing is that the child process IS created, but then the setup for the JVM creates another process to continue the install, ending the original one.
I think that makes nsExec believe that the process which was monitoring ended (which is true).

How can I wait for the other process to finish before continuing with my installer?

Things I´ve tried:
- nsExec
- ExecCmd
- ExecDos
- Keep asking if I can delete the setup file :down: in a loop
- Keep asking if the process is running in a loop

The last two are a bit (only a bit? :p ) unefficient (even with a "sleep" call) is there a more elegant solution?

Thanx for the answers.


What type of installer is it? InstallShield or?

-Stu


Originally posted by Afrow UK
What type of installer is it? InstallShield or?

-Stu
Yeap, IShield

More things I´ve tried:
- Calling the setup from a bat
- The same with a "/wait" parameter

More things I´ve tried:
- Calling the setup from a bat
- The same with a "/wait" parameter
If it is IShield launch it from cmd with switch /H to see its options. Should be a switch to solve your problem.

Being that it is an InstallShield installer, your question/problem has been answered many times before...
http://forums.winamp.com/showthread....+installshield

-Stu


And even more specifically for Java:

http://java.sun.com/j2se/1.4.2/docs/...de/silent.html

Used "java silent install" on Google to find it as first result.


I´ve already tried the silent installation, but didn´t get what I´ve expected.

The useful stuff I got it from one of the threads you pointed, I´ve reached here

That one was perfect! :up:

Thanx


That link doesn't work.

-Stu


Fixed! :)


I was just trying to fix the same problem at the moment with one of my installers that runs IShield. Thanks guys.