Include whether Mozilla Maintenance Service registry key is found in `background-update` Glean ping
Categories
(Toolkit :: Application Update, enhancement, P3)
Tracking
()
People
(Reporter: nalexander, Assigned: erchen)
References
Details
(Whiteboard: [fidedi-ope])
Attachments
(2 files)
At https://searchfox.org/mozilla-central/rev/45b20d00311bc2170dfbdae8a91bc4dca29717d8/toolkit/mozapps/update/BackgroundUpdate.sys.mjs#251-265 we include whether the maintenance service is enabled by preference, but not whether it's configured in the Windows registry. We should add the latter.
Updated•1 year ago
|
Updated•11 months ago
|
Hi Nick, can you point me towards resources where I can learn how to interface with the Windows registry to check configurations? Perhaps there are APIs? Thanks
Reporter | ||
Comment 2•18 days ago
|
||
(In reply to Eric Chen from comment #1)
Hi Nick, can you point me towards resources where I can learn how to interface with the Windows registry to check configurations? Perhaps there are APIs? Thanks
Absolutely! The way to do this in JS is with https://searchfox.org/mozilla-central/source/xpcom/ds/nsIWindowsRegKey.idl; you'll find lots of examples like https://searchfox.org/mozilla-central/rev/d3fea1aa852bb3a353a0a4a875c3685da11ce39b/toolkit/mozapps/update/UpdateService.sys.mjs#1252. (In native code, we might use the XPCOM interface just the same; or, in some situations, we might access the Reg*
Win32 API functions directly.)
Can you also elaborate on the definition of "maintenance service being configured on Windows Registry"? Would it be the same as isServiceInstalled - https://searchfox.org/mozilla-central/rev/d3fea1aa852bb3a353a0a4a875c3685da11ce39b/toolkit/mozapps/update/UpdateService.sys.mjs#1252, where we check if the content of "Installed" = 1?
I also noticed on my local machine's Registry Editor that there are various subkeys within maintenance service corresponding to the various installations of Firefox (see attachment). Do we need to verify whether a specific installation exists in Registry, or does having maintenance service itself suffice?
Reporter | ||
Comment 5•14 days ago
|
||
(In reply to Eric Chen from comment #3)
Can you also elaborate on the definition of "maintenance service being configured on Windows Registry"? Would it be the same as isServiceInstalled - https://searchfox.org/mozilla-central/rev/d3fea1aa852bb3a353a0a4a875c3685da11ce39b/toolkit/mozapps/update/UpdateService.sys.mjs#1252, where we check if the content of "Installed" = 1?
I also noticed on my local machine's Registry Editor that there are various subkeys within maintenance service corresponding to the various installations of Firefox (see attachment). Do we need to verify whether a specific installation exists in Registry, or does having maintenance service itself suffice?
It looks like we need a block just like this but in the background update task itself. (That is part of the reasons for not scheduling, which happens in the browsing profile sessions, not the background task executions.) Around https://searchfox.org/mozilla-central/rev/45b20d00311bc2170dfbdae8a91bc4dca29717d8/toolkit/mozapps/update/BackgroundUpdate.sys.mjs#609 should be the right place.
Reporter | ||
Comment 6•14 days ago
|
||
(In reply to Nick Alexander :nalexander [he/him] from comment #5)
(In reply to Eric Chen from comment #3)
Can you also elaborate on the definition of "maintenance service being configured on Windows Registry"? Would it be the same as isServiceInstalled - https://searchfox.org/mozilla-central/rev/d3fea1aa852bb3a353a0a4a875c3685da11ce39b/toolkit/mozapps/update/UpdateService.sys.mjs#1252, where we check if the content of "Installed" = 1?
I also noticed on my local machine's Registry Editor that there are various subkeys within maintenance service corresponding to the various installations of Firefox (see attachment). Do we need to verify whether a specific installation exists in Registry, or does having maintenance service itself suffice?
It looks like we need a block just like this but in the background update task itself. (That is part of the reasons for not scheduling, which happens in the browsing profile sessions, not the background task executions.) Around https://searchfox.org/mozilla-central/rev/45b20d00311bc2170dfbdae8a91bc4dca29717d8/toolkit/mozapps/update/BackgroundUpdate.sys.mjs#609 should be the right place.
I should have said that the block I linked is doing exactly the "registry subkey corresponding to this installation" verification you ask about. So: yes, we need to do that; and here's how to do that out-of-the-box.
Updated•12 hours ago
|
Updated•12 hours ago
|
Description
•