directedition
18th January 2010 14:23 UTC
Canceling mid-isntall
I have an installer with a fairly long install process. Sometime the user may want to cancel an install part of the way through. Unfortunately, when the installer runs through the install process, the 'Cancel' button is grayed out and can not be used. Is there a way to reactivate it? So the use can put the breaks on the installer and run the uninstall method?
kichik
18th January 2010 16:15 UTC
Nope.
CrushBug
18th January 2010 16:42 UTC
I don't believe there is a way with embedded files in a stock installer.
Our larger installers are based out of external RAR files, so we have written a plug-in that handles the un-RARing as well as re-enabling the Cancel button and handling it.
directedition
18th January 2010 19:33 UTC
May I take a look at your plugin? Is it available online?
Zinthose
18th January 2010 20:01 UTC
To offer this level of interaction mid installation, a transactional installer is recommended. Using NSIS this is likely achievable with a plug-in, which as far as I know doesn't exist yet.
Forgive the blasphemy, but you could create a non NSIS installer like a Windows Installer(MSI) package which offers native transactional support.
It would be a neat NSIS addon though:
- All operations have an process index that is stored in the registry upon completion.
- On failure the system can run the uninstaller for Rolling-back installs.
- On interruption system can run the installer from the last successful change for Resuming installs.
CrushBug
19th January 2010 04:04 UTC
Originally posted by directedition
May I take a look at your plugin? Is it available online?
It is an internal plug-in that is pretty closely tied to our systems. I probably can't release it in its current state, but it might be something we can do later.
I can probably answer some questions via private messages about it, if you want some hints at how we did it.