![]() |
#1 |
Junior Member
Join Date: Jun 2006
Posts: 23
|
Uninstall window running under Welcome screen..
Hi All,
Here's the problem. As soon as my Installer runs it looks to see if there is an existing version, and if it finds it, it runs the Uninstaller to remove the previous version first. The problem is that after the Uninstall window runs for a second, the Welcome screen opens directly above it, and the user doesn't see the Uninstall window running, so they can easily hit "Next", on the Welcome screen, and the Uninstall will be hosed. I'm currently using the Ultra Modern UI, but I've seen it happen with the MUI2.nsh also. What I'm currently doing is pretty kludgey. I let the Uninstall run for a second and a half, then do a "BringToFront", and that brings it back to the top, but it doesn't always work. Ideally I'd set a flag variable, in the Uninstall, saying that it's running and before the Welcome screen opens, it would check the flag, and if it was set, it would "wait" till the Uninstaller was finished before it opens. But it looks like you can't do any pre-opening stuff with the Welcome screen. Maybe, if I could create a Custom screen that looks exactly like the Welcome screen, then I could control it better. If anyone has any suggestions on how I can keep the Uninstall window from being covered over by the Welcome screen, I'd appreciate it! Oh, my Installer only runs on Windows, I'm not using it for any other platform. Thanks! |
![]() |
![]() |
![]() |
#2 |
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,333
|
You are probably executing the uninstaller incorrectly, are you using the _?= parameter and ExecWait?
IntOp $PostCount $PostCount + 1 |
![]() |
![]() |
![]() |
#3 |
Junior Member
Join Date: Jun 2006
Posts: 23
|
Thanks for your reply.
I was using: ExecWait "${INSTALL_DIRECTORY}\Webserver\bin\${UNINSTALLER}" And tried changing it to: ClearErrors ExecWait "${INSTALL_DIRECTORY}\Webserver\bin\${UNINSTALLER}" $0 And not doing anything with the return code '$0' I ran the Installer several times, and it seems to work, but the Welcome screen is under the Uninstall window every time. It won't take much for it to "decide" to come to the front. I looked around and only found _?= used once in Examples\makensis.nsi and couldn't find any docs on how it's used. I did find out that I CAN add a MUI_PAGE_CUSTOMFUNCTION_PRE before my !insertmacro MUI_PAGE_WELCOME And I wrote this Function: Function WelcomePre Loop_Start: StrCmp $UninstallRunning "TRUE" Loop_Start Loop_End Loop_End: FunctionEnd And it looks like it works pretty well. How do I use _?= ? Thanks! |
![]() |
![]() |
![]() |
#5 |
Junior Member
Join Date: Jun 2006
Posts: 23
|
There isn't ONE WORD in the FM about "_?="!
|
![]() |
![]() |
![]() |
#6 | |
Major Dude
Join Date: Feb 2007
Posts: 672
|
Quote:
|
|
![]() |
![]() |
![]() |
#7 |
Junior Member
Join Date: Jun 2006
Posts: 23
|
Sorry, I found it in the Uninstaller section. It wasn't in anything doing with
ExecWait Thanks |
![]() |
![]() |
![]() |
#8 |
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
That is because it has nothing to do (directly) with ExecWait. _?= is a specific option for the NSIS uninstall executable.
http://nsis.sourceforge.net/When_I_u...he_uninstaller Stu |
![]() |
![]() |
![]() |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|