- NSIS Discussion
- Exec an exe and show a message until the app finishes
Archive: Exec an exe and show a message until the app finishes
coco_vc
8th March 2006 15:32 UTC
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
coco_vc
8th March 2006 16:19 UTC
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
kichik
8th March 2006 19:24 UTC
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.
coco_vc
10th March 2006 11:35 UTC
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
kichik
10th March 2006 11:39 UTC
Yes, nsExec always waits.
Red Wine
10th March 2006 13:11 UTC
I guess banner plug in is what you're looking for
Rodri
30th March 2006 20:41 UTC
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.
Afrow UK
30th March 2006 20:44 UTC
What type of installer is it? InstallShield or?
-Stu
Rodri
30th March 2006 20:48 UTC
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
Red Wine
31st March 2006 01:00 UTC
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.
Afrow UK
31st March 2006 08:34 UTC
Being that it is an InstallShield installer, your question/problem has been answered many times before...
http://forums.winamp.com/showthread....+installshield
-Stu
kichik
31st March 2006 10:18 UTC
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.
Rodri
31st March 2006 16:25 UTC
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
Afrow UK
31st March 2006 16:29 UTC
That link doesn't work.
-Stu
Rodri
31st March 2006 18:34 UTC
Fixed! :)
JasonFriday13
2nd April 2006 22:40 UTC
I was just trying to fix the same problem at the moment with one of my installers that runs IShield. Thanks guys.