Archive: nsExec::Exec still flashes screen


nsExec::Exec still flashes screen
Hi,

I have to invoke an executable during my install procedure. First I used ExecWait but, that started a DOS console. After searching I here I found that using nsExec::Exec should be more convenient. But the installer window is still losing/gaining focus and my taskbar does something like flashing. This is annoying to the user.

How to make it run in the background AND not noticable to the user in front of the machine? Any recommendations??? Thanks!

[CODE]
;function call to updata data
;ExecWait '"$TEMP\datcmp.exe" /M=$TEMP\datcmp.ini' $6
nsExec::Exec /TIMEOUT=1000 '"$TEMP\datcmp.exe" /M=$TEMP\datcmp.ini'
[CODE]


You could try the ExecDos plugin which is on the Wiki.

-Stu


Hi Stu,

after replacing ExecWait with nsExec and now replacing it with ExecDos as you proposed, I can reply that there is still some kind of flashing in the screen. NSIS installer window is still loosing focus while calling this. You can see the evolution of my calls to different plugins...

;function call to compare indexfiles
;ExecWait '"$TEMP\datcmp.exe" /M=$TEMP\datcmp.ini' $6
;nsExec::Exec /TIMEOUT=1000 '"$TEMP\datcmp.exe" /M=$TEMP\datcmp.ini'
ExecDos::exec /NOUNLOAD /ASYNC '"$TEMP\datcmp.exe" /M=$TEMP\datcmp.ini' "$TEMP\execdos.log"
Pop $0 # thread handle for wait
;BringToFront ;using this did not changed anything :-(
# you can add some installation code here to execute while application is running.
ExecDos::wait $0


I am using BGImage plugin to make the installation use the full screen, showing a backround image and a color gradient. With this enabled I can see the taskbar flashing "through".

Please give some more advise. Thanks in advance.


This might happen if datcmp.exe starts third process that gains focus.


Updates:

I noticed that some installers like NVIDIA, MSI tools and the old installer I am replacing right now (done with WISE Installmanager 1.5) work with fullscreen background image or gradient BUT the taskbar stays in foreground during the installation. My new NSIS installer and some others completely cover it. Does anybody know how this option is called?

I looked throught the docs of plugin BGImage, but couldn't find anything about such an option. Help !!!

My Code:

Function CustomGUIInit
Push $R1
Push $R2
BgImage::SetReturn /NOUNLOAD on

BgImage::SetBg /NOUNLOAD /GRADIENT 255 255 255 0 30 100
Pop $R1
Strcmp $R1 success 0 error
File /oname=$PLUGINSDIR\bgimage.bmp vde71-splash.bmp
System::call "user32::GetSystemMetrics(i 0)i.R1"
System::call "user32::GetSystemMetrics(i 1)i.R2"
IntOp $R1 $R1 - 480
IntOp $R1 $R1 / 2
IntOp $R2 $R2 - 320
IntOp $R2 $R2 / 2
BGImage::AddImage /NOUNLOAD $PLUGINSDIR\bgimage.bmp $R1 $R2
CreateFont $R1 "Arial" 18 700
;BGImage::AddText /NOUNLOAD "$(^SetupCaption)" $R1 0 64 128 16 8 500 100
BGImage::AddText /NOUNLOAD "VDE-Vorschriftenwerk auf DVD - Version 7.1$\r$\nSetup" $R1 0 64 128 30 30 550 100
Pop $R1
Strcmp $R1 success 0 error
BGImage::Redraw /NOUNLOAD
Goto done
error:
MessageBox MB_OK|MB_ICONSTOP $R1
done:
Pop $R2
Pop $R1
FunctionEnd


I might have to add an option to the BGImage plugin to show the taskbar (not that hard). It will probably be in the next few days.