|
|
#1 |
|
Junior Member
Join Date: Mar 2005
Posts: 7
|
Modern UI Abort
Hi,
I am trying to call abort from one of my callbacks as shown below : !define MUI_CUSTOMFUNCTION_GUIINIT .ShowSplash !define MUI_PAGE_CUSTOMFUNCTION_PRE CheckPrevInstall !insertmacro MUI_PAGE_WELCOME Function CheckPrevInstall Push $0 ReadRegStr $0 ${REGROOT} ${REGKEY} "" StrCmp $0 "" CheckMore PromptUnInstall: MessageBox MB_YESNO|MB_ICONQUESTION "A previous version of SWFAudio was found.\ $\n$\nIt is recommended that you uninstall it first.$\n$\nDo you want to do that now?" IDNO NoUnInstall IDYES UnInstall UnInstall: ExecWait '$0\Uninstall.exe $R0' MessageBox MB_OK|MB_ICO |
|
|
|
|
|
#2 |
|
Junior Member
Join Date: Mar 2005
Posts: 7
|
[The previous one didn't get posted properly, sending again]
Hi, I am trying to call abort from one of my callbacks as shown below : !define MUI_CUSTOMFUNCTION_GUIINIT .ShowSplash !define MUI_PAGE_CUSTOMFUNCTION_PRE CheckPrevInstall !insertmacro MUI_PAGE_WELCOME Function CheckPrevInstall Push $0 ReadRegStr $0 ${REGROOT} ${REGKEY} "" StrCmp $0 "" CheckMore PromptUnInstall: MessageBox MB_YESNO|MB_ICONQUESTION "A previous version of SWFAudio was found.\ $\n$\nIt is recommended that you uninstall it first.$\n$\nDo you want to do that now?" IDNO NoUnInstall IDYES UnInstall UnInstall: ExecWait '$0\Uninstall.exe $R0' MessageBox MB_OK|MB_ICONINFORMATION "Click OK to continue installing ${MUI_PRODUCT}." Goto ExitFunction NoUnInstall: Abort CheckMore: ReadRegStr $0 ${REGROOT} ${ALTREGKEY} "" StrCmp $0 "" ExitFunction Goto PromptUnInstall ExitFunction: Pop $0 FunctionEnd Basically am trying to check if a previous version of my app is installed and if yes, prompt the user to uninstall it first. If the user chooses not to Uninstall, i need to abort the main installation. Please help me with this,. Thanks, Sathish. |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Mar 2005
Posts: 7
|
Clicking "No" on the "Confirm UnInstall" message box proceeds with the main install and doesn't abort.
|
|
|
|
|
|
#4 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
Your Function needs cleaning up...
![]() code: -Stu |
|
|
|
|
|
#5 |
|
Junior Member
Join Date: Mar 2005
Posts: 7
|
Thanks for the reply.
But am afraid that doesn't abort the installation! My original problem still persists even if i use the code modified as below: Function CheckPrevInstall2 Push $0 ReadRegStr $0 ${REGROOT} ${REGKEY} "" StrCmp $0 "" 0 PromptUnInstall ReadRegStr $0 ${REGROOT} ${ALTREGKEY} "" StrCmp $0 "" ExitFunction PromptUnInstall: MessageBox MB_YESNO|MB_ICONQUESTION "A previous version of SWFAudio was found.\ $\n$\nIt is recommended that you uninstall it first.$\n$\nDo you want to do that now?" IDNO DoAbort ExecWait '$0\Uninstall.exe $R0' MessageBox MB_OK|MB_ICONINFORMATION "Click OK to continue installing ${MUI_PRODUCT}." Goto ExitFunction DoAbort: Abort ExitFunction: Pop $0 FunctionEnd Please help. |
|
|
|
|
|
#6 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
Oh I thought you wanted it to run the uninstaller and wait for it to finish, and then continue with installation?
That's what my code does. If you want it to run the uninstaller and then quit, use Exec not ExecWait, and Quit not Abort. -Stu |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|