FIX: WSUS keys not removed on uninstall

This commit is contained in:
2025-09-28 13:26:43 +00:00
parent 8afc9e1840
commit 7648e3e921

View File

@@ -487,29 +487,27 @@ ${MementoSectionDone}
; Uninstaller ; Uninstaller
Section "-un.Legacy Update Server" un.WUSERVER Section "-un.Legacy Update Server" un.WUSERVER
; Clear WSUS server ; Clear WSUS server
${If} ${AtMostWinVista} ReadRegStr $0 HKLM "${REGPATH_WUPOLICY}" "WUServer"
ReadRegStr $0 HKLM "${REGPATH_WUPOLICY}" "WUServer" ${VerbosePrint} "WUServer: $0"
${VerbosePrint} "WUServer: $0" ${If} $0 == "${WSUS_SERVER}"
${If} $0 == "${WSUS_SERVER}" ${OrIf} $0 == "${WSUS_SERVER_HTTPS}"
${OrIf} $0 == "${WSUS_SERVER_HTTPS}" DeleteRegValue HKLM "${REGPATH_WUPOLICY}" "WUServer"
DeleteRegValue HKLM "${REGPATH_WUPOLICY}" "WUServer" DeleteRegValue HKLM "${REGPATH_WUAUPOLICY}" "UseWUServer"
DeleteRegValue HKLM "${REGPATH_WUAUPOLICY}" "UseWUServer" ${EndIf}
${EndIf}
ReadRegStr $0 HKLM "${REGPATH_WUPOLICY}" "WUStatusServer" ReadRegStr $0 HKLM "${REGPATH_WUPOLICY}" "WUStatusServer"
${VerbosePrint} "WUStatusServer: $0" ${VerbosePrint} "WUStatusServer: $0"
${If} $0 == "${WSUS_SERVER}" ${If} $0 == "${WSUS_SERVER}"
${OrIf} $0 == "${WSUS_SERVER_HTTPS}" ${OrIf} $0 == "${WSUS_SERVER_HTTPS}"
DeleteRegValue HKLM "${REGPATH_WUPOLICY}" "WUStatusServer" DeleteRegValue HKLM "${REGPATH_WUPOLICY}" "WUStatusServer"
DeleteRegValue HKLM "${REGPATH_WUAUPOLICY}" "UseWUServer" DeleteRegValue HKLM "${REGPATH_WUAUPOLICY}" "UseWUServer"
${EndIf} ${EndIf}
ReadRegStr $0 HKLM "${REGPATH_WU}" "URL" ReadRegStr $0 HKLM "${REGPATH_WU}" "URL"
${VerbosePrint} "URL: $0" ${VerbosePrint} "URL: $0"
${If} $0 == "${UPDATE_URL}" ${If} $0 == "${UPDATE_URL}"
${OrIf} $0 == "${UPDATE_URL_HTTPS}" ${OrIf} $0 == "${UPDATE_URL_HTTPS}"
DeleteRegValue HKLM "${REGPATH_WU}" "URL" DeleteRegValue HKLM "${REGPATH_WU}" "URL"
${EndIf}
${EndIf} ${EndIf}
SectionEnd SectionEnd