Hi,
during installation,when i click cancel it shows pop up that "Do you want to exit the setup?"
but installation is going on in background,when i click on yes then the installer quits,but,i want to pause the installation when the popup "Do you want to exit the setup?" is showed.for that i have written following code.
!Define XPUI_ABORTWARNING_TEXT "Do you want to exit the setup?" IDYes quit
Function INSTFILELEAVE
strcmp $XPUI_ABORTED 1 0 +2
quit
FunctionEnd
Please tell me what to do to pause installation when the popup is active.
unable to cancel installation in between installation process
8 posts
this is not working properly,installation is not paused when the abort confirmation popup is opened,installation is still continue in background uptil when i have click on yes button.
Please tell me how to pause the installation.
Please tell me how to pause the installation.
It's explained on that page - did you actually try?Originally Posted by dhiraj3301 View PostPlease tell me how to pause the installation.
OutFile "test.exe"
!include "xpui.nsh"
!include "LogicLib.nsh"
ShowInstDetails show
AutoCloseWIndow false
Var UserIsMakingAbortDecision
Function PauseIfUserIsMakingAbortDecision
${DoWhile} $UserIsMakingAbortDecision == "yes"
DetailPrint "Waiting for user to make decision..."
Sleep 500
${Loop}
FunctionEnd
!define PauseIfUserIsMakingAbortDecision `Call PauseIfUserIsMakingAbortDecision`
${Page} InstFiles
Section
GetDlgItem $0 $HWNDPARENT 2
EnableWindow $0 1
DetailPrint "A"
Sleep 1000
${PauseIfUserIsMakingAbortDecision}
DetailPrint "B"
Sleep 1000
${PauseIfUserIsMakingAbortDecision}
DetailPrint "C"
SectionEnd
Function .onUserAbort
StrCmp $NOABORTWARNING 1 AbortMe
StrCpy $UserIsMakingAbortDecision "yes"
MessageBox MB_YESNO|MB_ICONQUESTION "Are you sure you want to cancel Setup?" IDNO NoAbort
StrCpy $UserIsMakingAbortDecision "no"
!insertmacro XPUI_USERABORT
NoAbort:
StrCpy $UserIsMakingAbortDecision "no"
Abort
AbortMe:
FunctionEnd
!insertmacro XPUI_LANGUAGE "English" This is only the pausing part. You'll want further code changes to handle things elegantly.. hence that page.this code works fine but i have used
!Define XPUI_ABORTWARNING
!Define XPUI_ABORTWARNING_TEXT "Do you want to exit the setup?"
so,i cannot use function .OnUserAbort,please tell me is there any way to pause installation when we are using !Define XPUI_ABORTWARNING .
!Define XPUI_ABORTWARNING
!Define XPUI_ABORTWARNING_TEXT "Do you want to exit the setup?"
so,i cannot use function .OnUserAbort,please tell me is there any way to pause installation when we are using !Define XPUI_ABORTWARNING .
yes-and-no...Originally Posted by dhiraj3301 View Posttell me is there any way to pause installation when we are using !Define XPUI_ABORTWARNING .
you'll have to create your own abort warning, just as in the above example and the examples on the wiki page.
it is possible that you could adjust the ExperienceUI header file to add the pause variable (ExperienceUI\Contrib\XPUI.nsh, just search for .onUserAbort); you'll still have to check for that pause variable in your sections, yourself, though.
If it is anything like MUI it should have an MUI_CUSTOMFUNCTION_ABORT or similar define.
Stu
Stu
Doesn't seem to be. The only custom functions are for GUI init, GUI end and Pre/Show/Leave for pages. Defining XPUI_ABORTWARNING causes ExperienceUI to run its own .onUserAbort , which itself contains no code for handling additional user-based abort commands.Originally Posted by Afrow UK View PostIf it is anything like MUI it should have an MUI_CUSTOMFUNCTION_ABORT or similar define.
So setting up one's own .onUserAbort, and not using XPUI_ABORTWARNING, appears to be the road to take there.