Is there a in开发者_运维技巧tegrated Rollback-Action in any of the Installer-systems mentioned above? I know it's available in Windows Installer, but it seems to be missing in any other system I looked into.
Is there any system like Windows Installer that actually supports automatic Rollbacks?
NSIS does not support this because a script could do anything (Call any Windows API, use NSIS plugins to perform advanced tasks etc) and it would be impossible to know what and how to roll-back. But if you code the uninstaller to handle half-baked installs, you execute the uninstaller.
Innosetup does not do what I'd call a rollback. Case I tested was installing a newer version of a file over an older file, when cancelled IS displayed a box saying 'rolling back changes' however the newer file was still present (old file gone).
NSIS does not support automatic rollbacks, you have to code it yourself.
InnoSetup, however, does provide automatic rollback support. Special care needs to be taken to invoke it if you are using special scripts or hooks, but a simple install will have it "for free."
精彩评论