Archive: Option in unistaller possible?


Option in unistaller possible?
Hi everyone

I have one thing I would like to do but I don't know if it is possible:
is it possible to include a checkbox in the unistaller and perform a specific action when that checkbox is enabled?

I need this feature because in my current application, some files added by the application are not erased by the app, and I wanna give the user the option to erase those files.

Is it possible?

Thanks!


Create a custom page with InstallOptions, or just add a Components page and an unchecked Section (/o) to delete the files.

-Stu


More questions:

1- How do I add a Section with a name separated by spaces (ex: My Section)?

2- how do I make some uninstaller sections not appear in the unistaller (such as post, which I allways want to be checked - I don't want the user to see the "post" section)

3- Also, how do I add each uninstaller section's description?


In reply to my own question, i found the answer of question 2: just put a "-" before the section name; ex:
"Section -un.post"


1. Section "Section Name"

3. From Modern UI Manual:

For the uninstaller, use the MUI_UNFUNCTION_DESCRIPTION_BEGIN and MUI_UNFUNCTION_DESCRIPTION_END macros.
-Stu

OK, thanks a lot

Now there's a problem... My friends are telling me the installer gets confusing with Components, and they want me to "just" add a checkbox in the first page of the unistaller.

If the checkbox is checked, i want to do some actions. If it isn't, the unistaller won't do that action.

Is it possible to do that using installOptions? if so, how do I add the created .ini file in the uninstaller and how do I get the checked/unchecked status from it?

Thanks for the help


Use UninstPage and the MUI_INSTALLOPTIONS_* macros like any custom installer page.

-Stu


I've never made a .ini file, so could you tell me a place where I can find documentation on the creation of custom pages / UninstPage / MUI_INSTALLOPTIONS_* macros ?


UninstPage is in the NSIS Manual.
All Modern UI instructions are documented in the Modern UI Manual.
For custom pages, see the InstallOptions manual.

It's all under the NSIS Startmenu shortcut group.

-Stu


In .ini files, how do I get some installer variables, such as $INSTDIR or $DESKTOP?


You need to write them to the INI file with MUI_INSTALLOPTIONS_WRITE before displaying the page.

-Stu