Commit ab85189f authored by Edric Milaret's avatar Edric Milaret Committed by gerrit2

allow to remove conf/history files on uninstall

Change-Id: Iad5f9dc037be2d147db0604d11aa35a7af079591
Tuleap: #72
parent 5e6d6722
......@@ -29,6 +29,11 @@
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH
!define MUI_PAGE_CUSTOMFUNCTION_SHOW un.ModifyUnWelcome
!define MUI_PAGE_CUSTOMFUNCTION_LEAVE un.LeaveUnWelcome
!insertmacro MUI_UNPAGE_WELCOME
!insertmacro MUI_UNPAGE_INSTFILES
!insertmacro MUI_LANGUAGE "English"
RequestExecutionLevel admin ;Require admin rights on NT6+ (When UAC is turned on)
......@@ -135,6 +140,23 @@ function un.onInit
!insertmacro VerifyUserIsAdmin
functionEnd
Function un.ModifyUnWelcome
${NSD_CreateCheckbox} 120u -18u 50% 12u "Remove configuration and history files"
Pop $1
SetCtlColors $1 "" ${MUI_BGCOLOR}
${NSD_Check} $1 ; Check it by default
FunctionEnd
Function un.LeaveUnWelcome
${NSD_GetState} $1 $0
${If} $0 <> 0
rmDir /r "$LOCALAPPDATA\${COMPANYNAME}"
rmDir /r "$PROFILE\.config\ring"
rmDir /r "$PROFILE\.cache\ring"
rmDir /r "$PROFILE\.local\share\ring"
${EndIf}
FunctionEnd
section "uninstall"
# Remove Start Menu launcher
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment