Merge pull request #862 from McGiverGim/bf-fix_win32_unins

Fix win32 reinstall admin user
10.3.x-maintenance 10.1.0
Michael Keller 2018-01-17 01:00:21 +13:00 committed by GitHub
commit a06208a1a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 6 deletions

View File

@ -28,7 +28,7 @@ BrandingText "${COMPANY_NAME}"
!define MUI_UNICON ".\bf_uninstaller_icon.ico"
#Define uninstall list name
!define UninstName "UninstallBF"
!define UninstName "uninbf00"
# Request rights user level
RequestExecutionLevel highest
@ -99,7 +99,11 @@ Section
${If} $R3 != ""
# delete the installed files of the older version
RMDir /r $R3
!insertmacro INST_DELETE $R3 "${UninstName}"
# remove installation folder if empty
RMDir "$R3"
${Else}
# remove the older version, users without admin rights
ReadRegStr $R4 HKCU "Software\${GROUP_NAME}\${APP_NAME}" \
@ -110,7 +114,7 @@ Section
!insertmacro INST_DELETE $R4 "${UninstName}"
# remove installation folder if empty
RMDir "$INSTDIR"
RMDir "$R4"
${EndIf}
${EndIf}
@ -130,9 +134,6 @@ Section
# create the uninstaller
WriteUninstaller "$INSTDIR\${FILE_NAME_UNINSTALLER}"
# change uninstall list name
!insertmacro UNINST_NAME "unins000BF"
# store uninstaller data
!insertmacro UNINSTALLER_DATA_END