PDA

View Full Version : File backup questions



Tom H.
02-16-2012, 01:14 PM
Friedrich,

Couple questions for you:

1) Is there a way to make the replaced file backup optional? I know about setting %_SB_BACKUPDIR%, etc., but it seems that the setting from 'General Information' is an all or nothing setting. I haven't found any way to alter it or let the user choose when the script is running. And blanking the backup dir variable just results in the files being stuffed into the root folder on the drive (not a good thing, IMHO:eek:). Maybe if the runtime var is blank, you could skip the backup?

2) If the backup files option is set to 'No' in 'General Information', does that impact the ability of SB to roll back a failed install/update?

What I'm getting at is that I'd like to always have the script roll back if something goes wrong, but allow the end user to determine if they want to save/keep the replaced files after the script successfully completes.

Thanks,
Tom

linder
02-17-2012, 02:19 AM
Hi Tom,

The uninstall .exe can only rollback what is available in the uninstall .log. So if you have disabled the backup capability then the uninstall application can't rollback replaced files.

BTW, the "Set Installer Flag..." $SB_DISABLEFILEBACKUPFLAG$ lets you disable the "Backup Replaced Files" functionality at runtime.

Does this help?

Friedrich

Tom H.
02-17-2012, 02:37 PM
1) So the rollback is really just the uninstaller being automatically invoked to undo changes to that point? There's no way to have the installer keep temp copies of replaced files that are removed on successful completion?

2) That flag is exactly what I was looking for.

Thanks,
Tom

linder
02-18-2012, 05:07 AM
Hi Tom,

Yes, that is correct. The installer writes the "replaced file" actions to the uninstall .log and when something terrible happens during the installation process, the uninstall application is executed from within the setup.exe in "smart rollback" mode to rollback the logged modifications. If this was an update to an existing installation, it will not completely remove the application -- only rollback the last modifications.

Friedrich

Tom H.
02-20-2012, 10:04 AM
Got it.

Thanks,
Tom