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

Improve deletion of the Sandboxie folder #3044

Merged
merged 1 commit into from
Jun 17, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 15 additions & 6 deletions Sandboxie/install/SandboxieVS.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -849,10 +849,10 @@ Function CheckUpdates
DoCheck:
DetailPrint "Running UpdUtil ..."
SetDetailsPrint listonly

ExecWait '"$INSTDIR\UpdUtil.exe" $0 sandboxie /step:scan /scope:meta /version:${VERSION}' $1
;MessageBox MB_OK "UpdUtil: $0"

IntCmp $1 0 is0 lessthan0 morethan0
is0:
;DetailPrint "no update"
Expand All @@ -863,12 +863,12 @@ DoCheck:
morethan0:
DetailPrint "$$0 > 5"
Goto Update

Update:
MessageBox MB_YESNO|MB_ICONQUESTION "$(MSG_8055)" IDNO NoUpdate

ExecWait '"$INSTDIR\UpdUtil.exe" $0 sandboxie /step:apply /scope:meta'

NoUpdate:
SetDetailsPrint both
FunctionEnd
Expand Down Expand Up @@ -1183,7 +1183,7 @@ Function DeleteProgramFiles

Delete "$INSTDIR\KmdUtil.exe"
Delete "$INSTDIR\UpdUtil.exe"

Delete "$INSTDIR\SboxHostDll.dll"

Delete "$INSTDIR\boxHostDll.dll"
Expand Down Expand Up @@ -1247,14 +1247,23 @@ Function DeleteProgramFiles
StrCmp $DeleteSandboxieIni "N" SkipDeleteSandboxieIni
Delete "$INSTDIR\${SANDBOXIE_INI}"
Delete "$WINDIR\${SANDBOXIE_INI}"

SkipDeleteSandboxieIni:

;
; Delete installation folder
;

ClearErrors
RMDir "$INSTDIR"

IfErrors 0 SkipDeleteDir
Sleep 1000
RMDir "$INSTDIR"

SkipDeleteDir:
ClearErrors

FunctionEnd

;----------------------------------------------------------------------------
Expand Down