RobGrant
10th March 2006 13:03 UTC
Custom Uninstaller Pages
Hi guys
I can't quite see what I'm doing wrong, but whatever. The problem has given me almost no feedback: I launch the uninstaller; a dialog box pops up saying "Error launching installer" and it quits.
This is what I have:
Basically, I include a few custom pages in the uninstaller. The "un." naming is correct, as the thing compiles. Each custom page will use an ini file used in the main installer (although I haven't got as far as linking custom pages with ini files yet using "!insertmacro MUI_INSTALLOPTIONS_DISPLAY "something.ini").
All the uninstaller has is a few custom uninstpage calls to empty (but existent) functions (e.g. "UninstPage custom un.something un.something-Leave").
The un.Init function reserves and extracts the ini files. These are exactly the same commands (as they refer to the same files) as those used in the .Init function.
Any ideas?
Thanks!
kichik
10th March 2006 13:23 UTC
If the uninstaller is in a root directory, move it. If you want it to be in a root directory, use AllowRootDirInstall.
RobGrant
10th March 2006 13:30 UTC
Ah crap, yeah that's it. Did not expect that. Thanks man, where would we be without you.
RobGrant
10th March 2006 13:38 UTC
On a related topic, is there any way to "keep" variables defined in the installer in the uninstaller, seeing as the installer writes the uninstaller on the fly? I basically want paths and stuff contained in the executable, seeing as the uninstaller may be moved to a different machine to work.
I know this is unusual behaviour; the installer is actually being used to configure a remote database, so no local files are affected.
kichik
10th March 2006 13:44 UTC
No, you'll have to write them to the registry or some file on the installer side and manually read them on the uninsntaller side.
RobGrant
10th March 2006 13:48 UTC
Hmm ok fair enough. Is no variable written into the uninstaller at runtime? Even the install directory, anything like that? If so, I can use it :) If not, it's not a huge problem.
Thanks
kichik
10th March 2006 13:51 UTC
No variable is written to the uninstaller. The only things that go in the uninstaller are the stub, new icon and compressed uninstaller data generated at compile-time.