From c8e73b46a93185e2f3a66e0383950e432aa026c3 Mon Sep 17 00:00:00 2001 From: Nick Alexander Date: Thu, 14 Apr 2022 21:12:39 +0000 Subject: [PATCH] Bug 1763824 - Always add/update `FirefoxPDF-*` ProgID in Windows PostUpdate. r=mhowell,bhearsum This was simply an oversight on my part: I didn't appreciate that freshly introduced ProgIDs need to be added or updated unconditionally in PostUpdate. I've tested this by copying the fresh `helper.exe` into an existing installation directory, running `uninstall\helper.exe /PostUpdate` manually, verifying the expected ProgIDs exist in HKCR, and then verifying that "Make default" within Firefox succeeds. At some point we should do the same for `FirefoxHTML-*` and `FirefoxURL-*`, but this patch should be uplifted to Beta 100 and I don't want to introduce additional risk. Differential Revision: https://phabricator.services.mozilla.com/D143661 --- browser/installer/windows/nsis/shared.nsh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/browser/installer/windows/nsis/shared.nsh b/browser/installer/windows/nsis/shared.nsh index cd875a497547..5b5011575fba 100755 --- a/browser/installer/windows/nsis/shared.nsh +++ b/browser/installer/windows/nsis/shared.nsh @@ -982,12 +982,13 @@ ${RemoveDefaultBrowserAgentShortcut} ${EndIf} ${EndIf} - ${IsHandlerForInstallDir} "FirefoxPDF-$AppUserModelID" $R9 - ${If} "$R9" == "true" - ${AddDisabledDDEHandlerValues} "FirefoxPDF-$AppUserModelID" "$2" "$8,${IDI_DOCUMENT_PDF_ZERO_BASED}" \ - "${AppRegName} PDF Document" "" - ; We've never supported bare "FirefoxPDF". - ${EndIf} + ; FirefoxPDF-* was added after FirefoxHTML and FirefoxURL, so we've never + ; supported bare "FirefoxPDF". But we won't have it from the installer, so we + ; add/update it unconditionally. `PostUpdate` is gated on `uninstall.log` + ; being present, so the invocation here will only happen for installed + ; directories, not unpackaged directories. + ${AddDisabledDDEHandlerValues} "FirefoxPDF-$AppUserModelID" "$2" "$8,${IDI_DOCUMENT_PDF_ZERO_BASED}" \ + "${AppRegName} PDF Document" "" ${IsHandlerForInstallDir} "FirefoxURL-$AppUserModelID" $R9 ${If} "$R9" == "true"