Old 22nd September 2010, 19:17   #1
htome
Junior Member
 
Join Date: May 2009
Posts: 16
Call DetailPrint while in EXECWAIT

Hi there,

Is it possible to update the UI while inside a EXECWAIT?

I am installing a quite large application that doesn't give any feedback and I can't use "EXEC" as it is to difficult to verify if the large application was installed successfully.

So my best option is to call EXECWAIT and rotate some text using DetailPrint but not sure how to do it.

I tried by setting a timer right before I call EXECWAIT

${NSD_CreateTimer} OnRotateText 10

but my function is never called.

I am not sure if using nsExec or ExecDos will help... I haven't tried though...

Any suggestions?

Many thanks
htome is offline   Reply With Quote
Old 22nd September 2010, 19:45   #2
Animaether
Major Dude
 
Join Date: Jun 2001
Posts: 1,173
I don't think you can use the NSD timer within InstFiles (as there's no dialog kicking the timer off) - but putting it on its own page wouldn't do you any good either... It looks like ExecWait blocks those timers.

As far as feedback goes.. why not DetailPrint something that tells the user that this could take a while, and then try changing the progressbar to a marquee style progressbar? ( the kind that loops around).. then change back once the execwait is done.
Animaether is offline   Reply With Quote
Old 22nd September 2010, 20:01   #3
Animaether
Major Dude
 
Join Date: Jun 2001
Posts: 1,173
There's also some banner plugins that you could use that would have a similar effect.

Just to get back to your actual desire, though... there is of course one other option... create a wrapper installer that executes that large installer. That wrapper installer uses ExecWait so that it can get the large installer's exit code and check for successful installation. It, then, writes this out somewhere... to a file, to the registry.. whatever.

Then in your main installer, call -that- installer using Exec so that you're not waiting for it... and instead 'wait' by creating a loop that checks for that result (file/registry) value, does a little pause, and uses DetailPrint or whatever you want to let the user know the installer is still working, and simply waiting.

Nasty.. but should work.
Animaether is offline   Reply With Quote
Old 22nd September 2010, 20:29   #4
htome
Junior Member
 
Join Date: May 2009
Posts: 16
I liked the idea of a second NSIS installer for the large install.

Thanks
htome is offline   Reply With Quote
Old 22nd September 2010, 20:41   #5
Animaether
Major Dude
 
Join Date: Jun 2001
Posts: 1,173
keep in mind that if you use a file, the wrapper installer can't write entire tomes of information away.. otherwise the main installer might start reading the file while the wrapper is still writing to it (race condition... might try locking the file, I guess).. keep things as simple as possible

( I'm getting the feeling there's a better solution that I know about, but can't bring to the front of my mind right now )
Animaether is offline   Reply With Quote
Old 22nd September 2010, 21:20   #6
htome
Junior Member
 
Join Date: May 2009
Posts: 16
I decided to use a registry value
thanks
htome is offline   Reply With Quote
Old 23rd September 2010, 06:24   #7
jpderuiter
Major Dude
 
Join Date: Feb 2007
Posts: 672
Why not use the ExecDos plugin as you suggested in ASYNC mode?
jpderuiter is offline   Reply With Quote
Old 23rd September 2010, 16:50   #8
htome
Junior Member
 
Join Date: May 2009
Posts: 16
ExecDos is the winner!
It worked perfectly!
Thanks everyone!
htome is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump