Skip to content
⌘ NSIS Forum Archive

Install Options in Uninstall

4 posts

Isolated#

Install Options in Uninstall

Hi!

I want to ask the user if he wants to delete all files or if he wants to keep the logs and config files while uninstalling.

But I have no idea how I can do this.

Thank you...
Joel#
Yeah! For example with Modern UI:


UninstPage custom un.Hello

LangString TEXT_IO_TITLE ${LANG_ENGLISH} "Install Options Page Title"
LangString TEXT_IO_SUBTITLE ${LANG_ENGLISH} "A subtitle"

Function un.Hello

!insertmacro MUI_HEADER_TEXT "$(TEXT_IO_TITLE)" "$(TEXT_IO_SUBTITLE)"

Push $R0
Push $R1
Push $R2

!insertmacro MUI_INSTALLOPTIONS_INITDIALOG "ioFile.ini"
Pop $R0

GetDlgItem $R1 $R0 1200 ;1200 + Field number - 1

;$R1 contains the HWND of the first field
CreateFont $R2 "Tahoma" 10 700
SendMessage $R1 ${WM_SETFONT} $R2 0

!insertmacro MUI_INSTALLOPTIONS_SHOW

Pop $R1
Pop $R1
Pop $R0

FunctionEnd