Archive: Close page window automaticly and safely?


Close page window automaticly and safely?
Var AlreadySetup
Var Modify

!macro MAINTENANCE
page custom ModifyShow ModifyLeave
!macroend

!insertmacro MAINTENANCE //my own macro
!insertmacro MUI_PAGE_WELCOME

Function .onInit
...
IfFileExists "$INSTDIR\myApplication.exe" 0 +3
StrCpy $AlreadySetup 1
goto End
...
End:
FunctionEnd

Function ModifyShow

${If} $AlreadySetup == 1
InstallOptions::initDialog /NOUNLOAD "$R0\modify.ini"
InstallOptions::show
${EndIf}

FunctionEnd

Function ModifyLeave

ReadINIStr $Modify "$R0\modify.ini" "Field 2" "State"
${If} $Modify == 0
ExecShell "open" "$INSTDIR\uninst.exe"
************************************************
my problem is at here?????????
************************************************
${Else}
Call RunOrNot //call my own function
${EndIf}

FunctionEnd
----------------------------------------------------------
How to realize the following purpose?
-After it executed [ExecShell...] ,I want that the custom page window can close automaticly and safely.Then the setup is finished at here.
----------------------------------------------------------

Thanks very much for help!!!:up: :up: :up: :up:


simply call Quit?

4.9.4.17 Quit
Causes the installer to exit as soon as possible. After Quit is called, the installer will exit (no callback functions will get a chance to run).

Thank you! It can work so well.


just make sure you don't have any cleanup code in any callbacks that would normally run when the installer finishes. If you do, you'll have to either duplicate that cleanup code, or use a different method instead. E.g. in an installer I maintain, a 'skip' variable is set to true and each page calls Abort if that variable is true - thereby skipping that page.


Yes.I did that like your method.I found that way occasionally.@_@^_^:p