Open Bug 1752696 Opened 2 years ago Updated 2 years ago

Put Windows Error Configuration keys under HKEY_LOCAL_MACHINE for tests & users w/o admin rights

Categories

(Toolkit :: Crash Reporting, enhancement)

Unspecified
Windows
enhancement

Tracking

()

People

(Reporter: gsvelto, Unassigned)

References

Details

When I first implemented the WER runtime exception module I had our installer store the module helper DLL under HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Windows Error Reporting\RuntimeExceptionHelperModules. However while reading Microsoft's documentation I discovered that the same keys can also be stored on a per-user basis under HKEY_CURRENT_USER\Software\Microsoft\Windows\Windows Error Reporting\RuntimeExceptionHelperModules. Given every user has rights to modify its HKCU store we can leverage this for two purposes:

  1. xpcshell tests can set the key in order to test the WER runtime exception module, cause a crash that cannot be caught through normal means and then verify that the minidump was generated correctly
  2. The installer and updater could be modified to store the key under the HKCU store if storing it in the HKLM one fails

I'm pretty sure I can implement 1 w/o much ado but I'm not sure about 2. Molly does that sound feasible/reasonable? The goal is to make sure that we cover more users with this piece of infrastructure which relies on that registry key being present in order to work.

Flags: needinfo?(mhowell)

We already have some support for doing things in whichever registry hive we can write to; there's a variable (which is quite unfortunately named $TmpVal) that we set to the name of the proper hive based on the result of attempting to write to HKLM. So I think you could get what you need by just swapping out the write to HKLM with a write to $TmpVal, something like this.

Flags: needinfo?(mhowell)

Thanks! I verified that if the key is set under HKCU it's picked up correctly by the WER service. The change should be trivial then.

See Also: → 1758673
You need to log in before you can comment on or make changes to this bug.