Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add innosetup uninstall cleanup of extra files v2 #1235

Merged
merged 1 commit into from
Oct 13, 2021

Conversation

mpheath
Copy link
Collaborator

@mpheath mpheath commented Sep 29, 2021

Uninstall Cleanup based on 2 or 3 buttons for Sandboxie-Plus.

This is like #1058, though not just 3 buttons.

button2or3.gif

The procedure can be called with a parameter to set number of buttons.

  • UninstallCleanup(3);
    • 3 buttons:
      • Keep configuration files and sandboxes.
      • Remove configuration files
      • Remove configuration files and sandboxes.
  • UninstallCleanup(2);
    • 2 buttons:
      • Keep configuration files and sandboxes.
      • Remove configuration files.

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:

  // User to confirm extra files to remove.
  if not UninstallSilent then
    UninstallCleanup(2);

Disable procedure call by comment:

  // User to confirm extra files to remove.
  //if not UninstallSilent then
  //  UninstallCleanup(2);

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');

@mpheath mpheath marked this pull request as ready for review September 29, 2021 07:19
@isaak654
Copy link
Collaborator

isaak654 commented Oct 1, 2021

Thank you for the interesting improvements! If nothing wrong comes out, I think it could be merged soon after 0.9.7 release.

@mpheath
Copy link
Collaborator Author

mpheath commented Oct 1, 2021

I agree with that plan. 0.9.7 release should be a stable install and will allow this feature to be in the 0.9.8 release. David can set the parameter from 2 to 3 later when Sandman supports it.

Thank you for the custom messages and thanks to all the translators who contributed to this feature!

@isaak654

This comment has been minimized.

@mpheath
Copy link
Collaborator Author

mpheath commented Oct 13, 2021

Merge commit for v0.9.8 Plus release.

@mpheath mpheath merged commit 21a9105 into sandboxie-plus:master Oct 13, 2021
@mpheath mpheath deleted the button2or3 branch October 13, 2021 03:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants