Archive: Custom Uninstaller Pages


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!


If the uninstaller is in a root directory, move it. If you want it to be in a root directory, use AllowRootDirInstall.


Ah crap, yeah that's it. Did not expect that. Thanks man, where would we be without you.


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.


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.


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


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.