Go Back   Winamp Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 24th August 2006, 12:54   #1
coco_vc
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
coco_vc is offline   Reply With Quote
Old 25th August 2006, 11:48   #2
coco_vc
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
coco_vc is offline   Reply With Quote
Old 25th August 2006, 12:36   #3
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
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
kichik is offline   Reply With Quote
Old 28th August 2006, 13:52   #4
coco_vc
Senior Member
 
Join Date: Jan 2006
Location: Germany
Posts: 138
Yes, that's indeed better

Thx,
Viv
coco_vc is offline   Reply With Quote
Reply
Go Back   Winamp Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump