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

Fix innosetup script to remove shell integration keys #1037

Merged
merged 1 commit into from
Jul 26, 2021

Conversation

mpheath
Copy link
Collaborator

@mpheath mpheath commented Jul 25, 2021

Remove shell integration in innosetup fix with RegDeleteKeyIncludingSubkeys function, instead of RegDeleteValue function as sandbox is a registry key, not a registry value. RegDeleteValue would have been failing (with a return value of False) as it cannot remove keys and the subkeys as it is documented to remove a value.

These are the sandbox keys copied from RegEdit that require keys and subkeys removed at uninstall of Sandboxie Plus.

HKEY_CURRENT_USER\Software\Classes\*\shell\sandbox
HKEY_CURRENT_USER\Software\Classes\Folder\shell\sandbox

This fix has not been compiled and tested, though it should be an improvement. No other registry functions appear to have any similar issues with a quick review of the innosetup source.

@mpheath mpheath marked this pull request as ready for review July 25, 2021 16:42
@isaak654
Copy link
Collaborator

isaak654 commented Jul 25, 2021

What do you think about adding these?

RegDeleteKeyIncludingSubkeys(HKEY_CLASSES_ROOT, '*\shell\sandbox');
RegDeleteKeyIncludingSubkeys(HKEY_CLASSES_ROOT, 'folder\shell\sandbox');

I'm not sure if they were part of an old Plus install

@isaak654 isaak654 linked an issue Jul 25, 2021 that may be closed by this pull request
@mpheath
Copy link
Collaborator Author

mpheath commented Jul 25, 2021

HKEY_CLASSES_ROOT is a mirror of combined HKCU and HKLM. It should not be written to. Same could be said for removal. Writing to HKCR can overwrite whatever exists in HKCU or HKLM as you do not know at write time. It would not be recommended to handle, in my opinion. You may expect it to do HKCU, but if not there and HKLM entries exist, they may be removed even though they should remain. It may not do harm in this case.

@isaak654
Copy link
Collaborator

isaak654 commented Jul 25, 2021

HKEY_CLASSES_ROOT is a mirror of combined HKCU and HKLM.

For some reason I forgot that detail, probably because other scripts try to fiddle with it.

Imho this pull request should be merged in the next few hours... especially if we consider that Google Safe Browsing could have marked the releases page as unsafe for the reason in highlight:

immagine

It would also be great if in another pull request we could clean the Sandboxie-Plus folders left by the uninstaller in AppData\Local and in ProgramFiles. I mentioned the exact behavior in the linked issue, when I suggested to introduce one prompt before or after the uninstall process that asks "Do you want to uninstall also your configuration files (Sandboxie.ini and Sandboxie-Plus.ini)?".

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.

How do I fully uninstall?
3 participants