Trial Installations
How do I allow a user to install one portion of a program, let him/her play with the program, and then allow him/her to choose if he/she wants to install another component now or not?
Okay,
I love Nullsoft. Ya'll are awesome.
Using KiCHiK's example "one-section" I have set up a installer which brings up 10 choices. The user selects one (and only one) of these choices. The installer installs the choice and runs the app (myapp) using ExecWait. The user looks around at the app and uses the choice they made. The user exits myapp upon which the installer asks MB_YESNO "you want to install another now?" On YES, the installer opens another instance of itself and closes the old instance. On NO, the installer QUITs.
This works fine for the first or second time, at the third time on NO and CLOSE though AutoWindowClose is TRUE, the installer (which has reached 100% complete and says "COMPLETE") opens myapp which is outside the logical order at this point.
On closing, my logic uses MB_YESNO again, I choose NO and number three installer closes.
Repeating the same, open myapp out of order and NO to MB_YESNO after exit myapp the remaining two installers close perfectly.
Here's the brief (this is not raw code, this is interpreted code)version of KiCHiK's script modified.
ComponentText "choose"
Sections 0-10 (including required components)
.onInit remembers which one is selected
.onSelChange turns off the old selection and turns on the new one
Function CALLEDBYSECTIONS 1-10
ExecWait myapp
onexit MB_YESNO "another?" IDYES goto ShowIT
If NO goto STOPIT
ShowIT:
ExecWait Installer.exe
goto STOPIT
STOPIT:
QUIT
FunctionEnd
This works once or twice, but definately not on the third one. So, I put MessageBox's at each logical crux so this I couldn't get lost in this simple program.
The first time, all MB_OK's show up fine. The second and third times, "NO" MB_OK's show up.
What do you guys think? Am I crazy? Is this a bug or am I thinking incorrectly about this?
Let me KNOW, share with me your knowledge and experience
jacob
a working copy of trial is attached, i stripped everything but the essentials (still does the same thing, by the way)