Skip to content

Commit a06208a

Browse files
authored
Merge pull request #862 from McGiverGim/bf-fix_win32_unins
Fix win32 reinstall admin user
2 parents 6324a48 + 6d412ea commit a06208a

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

assets/windows/installer.nsi

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ BrandingText "${COMPANY_NAME}"
2828
!define MUI_UNICON ".\bf_uninstaller_icon.ico"
2929

3030
#Define uninstall list name
31-
!define UninstName "UninstallBF"
31+
!define UninstName "uninbf00"
3232

3333
# Request rights user level
3434
RequestExecutionLevel highest
@@ -99,7 +99,11 @@ Section
9999

100100
${If} $R3 != ""
101101
# delete the installed files of the older version
102-
RMDir /r $R3
102+
!insertmacro INST_DELETE $R3 "${UninstName}"
103+
104+
# remove installation folder if empty
105+
RMDir "$R3"
106+
103107
${Else}
104108
# remove the older version, users without admin rights
105109
ReadRegStr $R4 HKCU "Software\${GROUP_NAME}\${APP_NAME}" \
@@ -110,7 +114,7 @@ Section
110114
!insertmacro INST_DELETE $R4 "${UninstName}"
111115

112116
# remove installation folder if empty
113-
RMDir "$INSTDIR"
117+
RMDir "$R4"
114118

115119
${EndIf}
116120
${EndIf}
@@ -130,9 +134,6 @@ Section
130134
# create the uninstaller
131135
WriteUninstaller "$INSTDIR\${FILE_NAME_UNINSTALLER}"
132136

133-
# change uninstall list name
134-
!insertmacro UNINST_NAME "unins000BF"
135-
136137
# store uninstaller data
137138
!insertmacro UNINSTALLER_DATA_END
138139

0 commit comments

Comments
 (0)