- NSIS Discussion
- Option in unistaller possible?
Archive: Option in unistaller possible?
pedroac
8th August 2006 11:52 UTC
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!
Afrow UK
8th August 2006 12:16 UTC
Create a custom page with InstallOptions, or just add a Components page and an unchecked Section (/o) to delete the files.
-Stu
pedroac
9th August 2006 15:59 UTC
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?
pedroac
9th August 2006 16:53 UTC
In reply to my own question, i found the answer of question 2: just put a "-" before the section name; ex:
"Section -un.post"
Afrow UK
9th August 2006 16:56 UTC
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
pedroac
9th August 2006 17:08 UTC
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
Afrow UK
9th August 2006 17:24 UTC
Use UninstPage and the MUI_INSTALLOPTIONS_* macros like any custom installer page.
-Stu
pedroac
9th August 2006 17:38 UTC
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 ?
Afrow UK
9th August 2006 17:49 UTC
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
pedroac
10th August 2006 18:13 UTC
In .ini files, how do I get some installer variables, such as $INSTDIR or $DESKTOP?
Afrow UK
10th August 2006 19:39 UTC
You need to write them to the INI file with MUI_INSTALLOPTIONS_WRITE before displaying the page.
-Stu