简体   繁体   中英

Simulate next click on INSTFILES page to take user to a Custom Page (NSIS)

This is my use case:

I'm creating an uninstaller using NSIS.
I'm in the "MUI_UNPAGE_INSTFILES" page during the uninstallation flow.
Files got removed in the "Section Uninstall" code.
Now I need the user to be taken to a custom page, by simulating the next button click in "MUI_UNPAGE_INSTFILES".
I did check for "MUI_UNFINISHPAGE_NOAUTOCLOSE", but I don't have it defined in my code. Still it is not automatically moving to the next page.

This is the code where the pages are defined for the uninstaller:

UninstPage custom un.UninstConfirm_Show ;1st page (custom page)
!insertmacro MUI_UNPAGE_INSTFILES ;2nd page
UninstPage custom un.UninstFinish_Show ;3rd & final page (custom page)

I need to move from 2nd page to 3rd page without user clicking on the next button in the 2nd page.
Any ideas ?

Use the following code to simulate clicking the Next button:

GetDlgItem $0 $HWNDPARENT 1
SendMessage $HWNDPARENT ${WM_COMMAND} 1 $0

FYI: http://forums.winamp.com/showthread.php?t=187143

当使用 MUI 完成页面时,MUI 在un.onGUIInit调用SetAutoClose true ,但您可以在卸载程序部分调用SetAutoClose true以达到相同的效果。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM