Add innosetup uninstall cleanup of extra files v2 #1235
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uninstall Cleanup based on 2 or 3 buttons for Sandboxie-Plus.
This is like #1058, though not just 3 buttons.
The procedure can be called with a parameter to set number of buttons.
UninstallCleanup(3);
UninstallCleanup(2);
Currently set as 2 buttons and can be set as 3 buttons once Sandman implements the
/RemoveSandboxes
argument.This also can be beneficial for those who want to recompile with Inno Setup as they can choose 2 or 3 buttons by changing the parameter. If do not want the dialog to display, set a parameter that is 0 or larger that is not 2 or 3. Alternatively, comment the procedure call to disable it.
This code calls the UninstallCleanup procedure:
Disable procedure call by comment:
The dialog will not display if the install is silent.
Default button is Keep configuration files and sandboxes.
Current files to remove are:
{localappdata}\{#MyAppName}\{#MyAppName}.ini
{win}\Sandboxie.ini
{app}\{#MyAppName}.ini
{app}\Sandboxie.ini
If 3rd button is selected, remove files listed and remove all sandboxes.
A TStringList type is used so adding more files later can be done by
Paths.Append('another_path_to_remove');