Improve deletion of the Sandboxie folder

This commit is contained in:
isaak654 2023-06-17 23:45:03 +02:00 committed by GitHub
parent 02b39d4fb9
commit 3770420920
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 15 additions and 6 deletions

View File

@ -849,10 +849,10 @@ Function CheckUpdates
DoCheck: DoCheck:
DetailPrint "Running UpdUtil ..." DetailPrint "Running UpdUtil ..."
SetDetailsPrint listonly SetDetailsPrint listonly
ExecWait '"$INSTDIR\UpdUtil.exe" $0 sandboxie /step:scan /scope:meta /version:${VERSION}' $1 ExecWait '"$INSTDIR\UpdUtil.exe" $0 sandboxie /step:scan /scope:meta /version:${VERSION}' $1
;MessageBox MB_OK "UpdUtil: $0" ;MessageBox MB_OK "UpdUtil: $0"
IntCmp $1 0 is0 lessthan0 morethan0 IntCmp $1 0 is0 lessthan0 morethan0
is0: is0:
;DetailPrint "no update" ;DetailPrint "no update"
@ -863,12 +863,12 @@ DoCheck:
morethan0: morethan0:
DetailPrint "$$0 > 5" DetailPrint "$$0 > 5"
Goto Update Goto Update
Update: Update:
MessageBox MB_YESNO|MB_ICONQUESTION "$(MSG_8055)" IDNO NoUpdate MessageBox MB_YESNO|MB_ICONQUESTION "$(MSG_8055)" IDNO NoUpdate
ExecWait '"$INSTDIR\UpdUtil.exe" $0 sandboxie /step:apply /scope:meta' ExecWait '"$INSTDIR\UpdUtil.exe" $0 sandboxie /step:apply /scope:meta'
NoUpdate: NoUpdate:
SetDetailsPrint both SetDetailsPrint both
FunctionEnd FunctionEnd
@ -1183,7 +1183,7 @@ Function DeleteProgramFiles
Delete "$INSTDIR\KmdUtil.exe" Delete "$INSTDIR\KmdUtil.exe"
Delete "$INSTDIR\UpdUtil.exe" Delete "$INSTDIR\UpdUtil.exe"
Delete "$INSTDIR\SboxHostDll.dll" Delete "$INSTDIR\SboxHostDll.dll"
Delete "$INSTDIR\boxHostDll.dll" Delete "$INSTDIR\boxHostDll.dll"
@ -1247,14 +1247,23 @@ Function DeleteProgramFiles
StrCmp $DeleteSandboxieIni "N" SkipDeleteSandboxieIni StrCmp $DeleteSandboxieIni "N" SkipDeleteSandboxieIni
Delete "$INSTDIR\${SANDBOXIE_INI}" Delete "$INSTDIR\${SANDBOXIE_INI}"
Delete "$WINDIR\${SANDBOXIE_INI}" Delete "$WINDIR\${SANDBOXIE_INI}"
SkipDeleteSandboxieIni: SkipDeleteSandboxieIni:
; ;
; Delete installation folder ; Delete installation folder
; ;
ClearErrors
RMDir "$INSTDIR" RMDir "$INSTDIR"
IfErrors 0 SkipDeleteDir
Sleep 1000
RMDir "$INSTDIR"
SkipDeleteDir:
ClearErrors
FunctionEnd FunctionEnd
;---------------------------------------------------------------------------- ;----------------------------------------------------------------------------