commit e2b0efb35e38e044284e1307185a66f75dbfa1b8
parent a1c83970bec656a5668ca8a5cfb94cf011daa22a
Author: Duncan McIntosh <dmcintosh@mozilla.com>
Date: Tue, 21 Oct 2025 22:03:02 +0000
Bug 1990965 - Part 2: Add information about the launching application to the stub installer ping. r=cdupuis,browser-installer-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D266503
Diffstat:
2 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/browser/app/desktop-launcher/main.cpp b/browser/app/desktop-launcher/main.cpp
@@ -13,6 +13,7 @@
#include "tempfile_name.h"
#define DOWNLOAD_PAGE L"https://www.mozilla.org/firefox/new/"
+#define STUB_INSTALLER_ARGS L"/Prompt /LaunchedBy:desktoplauncher"
int wmain() {
// For telemetry purposes, let's set the env variable to indicate that
@@ -58,7 +59,7 @@ int wmain() {
sei.cbSize = sizeof(sei);
sei.fMask = SEE_MASK_WAITFORINPUTIDLE | SEE_MASK_NOASYNC;
sei.lpFile = tempfileName.value().c_str();
- sei.lpParameters = L"/Prompt";
+ sei.lpParameters = STUB_INSTALLER_ARGS;
sei.nShow = SW_SHOWNORMAL;
ShellExecuteExW(&sei);
diff --git a/browser/installer/windows/nsis/stub.nsh b/browser/installer/windows/nsis/stub.nsh
@@ -101,7 +101,7 @@ Var ArchToInstall
; the stub installer
;!define STUB_DEBUG
-!define StubURLVersion "v10"
+!define StubURLVersion "v11"
; Successful install exit code
!define ERR_SUCCESS 0
@@ -934,6 +934,13 @@ Function SendPing
${EndIf}
${EndIf}
+ ${GetParameters} $R9
+ ClearErrors
+ ${GetOptions} "$R9" "/LaunchedBy:" "$R4"
+ ${If} ${Errors}
+ StrCpy $R4 "unknown"
+ ${EndIf}
+
StrCpy $R3 "1"
; Note: ExitCode gets parsed here to determine values for "succeeded",
@@ -984,7 +991,8 @@ Function SendPing
$\nDistribution ID = $DistributionID \
$\nDistribution Version = $DistributionVersion \
$\nWindows UBR = $WindowsUBR \
- $\nStub Installer Build ID = $StubBuildID"
+ $\nStub Installer Build ID = $StubBuildID \
+ $\nLaunched by = $R4"
; The following will exit the installer
SetAutoClose true
StrCpy $R9 "2"
@@ -993,7 +1001,7 @@ Function SendPing
${StartTimer} ${DownloadIntervalMS} OnPing
; See https://firefox-source-docs.mozilla.org/toolkit/components/telemetry/data/install-ping.html#stub-ping
; for instructions on how to make changes to data being reported in this ping
- InetBgDL::Get "${BaseURLStubPing}/${StubURLVersion}${StubURLVersionAppend}/${Channel}/${UpdateChannel}/${AB_CD}/$R0/$R1/$5/$6/$7/$8/$9/$ExitCode/$FirefoxLaunchCode/$DownloadRetryCount/$DownloadedBytes/$DownloadSizeBytes/$IntroPhaseSeconds/$OptionsPhaseSeconds/$0/$1/$DownloadFirstTransferSeconds/$2/$3/$4/$InitialInstallRequirementsCode/$OpenedDownloadPage/$ExistingProfile/$ExistingVersion/$ExistingBuildID/$R5/$R6/$R7/$R8/$R2/$R3/$DownloadServerIP/$PostSigningData/$ProfileCleanupPromptType/$CheckboxCleanupProfile/$DistributionID/$DistributionVersion/$WindowsUBR/$StubBuildID" \
+ InetBgDL::Get "${BaseURLStubPing}/${StubURLVersion}${StubURLVersionAppend}/${Channel}/${UpdateChannel}/${AB_CD}/$R0/$R1/$5/$6/$7/$8/$9/$ExitCode/$FirefoxLaunchCode/$DownloadRetryCount/$DownloadedBytes/$DownloadSizeBytes/$IntroPhaseSeconds/$OptionsPhaseSeconds/$0/$1/$DownloadFirstTransferSeconds/$2/$3/$4/$InitialInstallRequirementsCode/$OpenedDownloadPage/$ExistingProfile/$ExistingVersion/$ExistingBuildID/$R5/$R6/$R7/$R8/$R2/$R3/$DownloadServerIP/$PostSigningData/$ProfileCleanupPromptType/$CheckboxCleanupProfile/$DistributionID/$DistributionVersion/$WindowsUBR/$StubBuildID/$R4" \
"$PLUGINSDIR\_temp" /END
!endif
${Else}