|
|||||||
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
|
#1 |
|
Senior Member
Join Date: Jan 2006
Location: Germany
Posts: 138
|
silent - callback function that validates a custom page
Hi all,
When uninstalling first thing the uninstaller does is to show a custom page that asks: a) uninstall the product from the machine b) disable for current user Then in the "Function un.ValidateSelection" (where: UninstPage custom un.UninstallModePage un.ValidateSelection) I do: if users choses a, the uninstaller goes normally further. If the user choses b, the uninstaller runs an exe from my application and then quits, as the product shouldn't be uninstalled, and my exe will take care of just disabling for current user. This works ok in a non-silent uninstall, but in a silent uninstall, the function un.ValidateSelection is not called. Where and how should I write the neccesary code? meaning the code that checks if a) or b) should be done (in a silent uninstall can be part of the cmd line param) and in case it's a) to run an exe and to quit the uninstaller? Thx, Viv |
|
|
|
|
|
#2 |
|
Senior Member
Join Date: Jan 2006
Location: Germany
Posts: 138
|
haven't I been clear with my question, or there is no "right" answer for it?
Thx, Viv |
|
|
|
|
|
#3 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,337
|
You should implement the working code in the sections and only have the custom page set a variable that tells the code what to do. That same variable can also be set in un.onInit according to the command line.
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#4 |
|
Senior Member
Join Date: Jan 2006
Location: Germany
Posts: 138
|
Yes, that's indeed better
![]() Thx, Viv |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|