Apply install-script registry keys under the WOW64 hive names
Description
A Steam game's install script can name its registry hive HKEY_LOCAL_MACHINE_WOW64_32 or HKEY_LOCAL_MACHINE_WOW64_64 instead of HKEY_LOCAL_MACHINE. The app only recognized HKEY_LOCAL_MACHINE, HKLM and HKEY_CURRENT_USER, so it skipped every key under these two names. Need for Speed Most Wanted, for example, keeps its Install Dir, Locale and GDFBinary values under HKEY_LOCAL_MACHINE_WOW64_32\SOFTWARE\EA Games\Need for Speed(TM) Most Wanted.
These keys are now written:
HKEY_LOCAL_MACHINE_WOW64_32goes to the 32-bit view (Software\Wow6432Node\...), the same as plainHKEY_LOCAL_MACHINE.HKEY_LOCAL_MACHINE_WOW64_64goes to the native view, with noWow6432Noderedirect.
Tested on a Retroid Pocket 6 with Need for Speed Most Wanted (Steam, real Steam client launch), forcing the install script to be applied again:
- Before the Steam client started, the prefix registry held the game's
Install Dir,LocaleandGDFBinaryunderSoftware\Wow6432Node\EA Games\Need for Speed(TM) Most Wanted, written by the app. - The game still reached its title screen.
SteamInstallScriptRegistryTestpasses, including a new test for both hive names.
Limit: on this game the Steam client writes the same key itself a few seconds later, so this run shows the app's write and no regression, not a visible change. I have no installed game on the test device that depends on these keys without the Steam client.
Recording
Screenshots from the device run are available on request.
Type of Change
- Bug fix
- Performance / stability improvement
- Compatibility improvements
- Other (requires prior approval)
Checklist
- If I have access to
#code-changes, I have discussed this change there and it has been green-lighted. If I do not have access, I have still provided clear context in this PR. If I skip both, I accept that this change may face delays in review, may not be reviewed at all, or may be closed. - This change aligns with the current project scope (core functionality, stability, or performance). If not, it has been explicitly approved beforehand.
- I have attached a recording of the change.
- I have read and agree to the contribution guidelines in
CONTRIBUTING.md.
Summary by cubic
Fixes Steam install scripts that use HKEY_LOCAL_MACHINE_WOW64_32 or HKEY_LOCAL_MACHINE_WOW64_64 as hive names, so their registry keys are now applied instead of being skipped. The 32-bit form writes to the Wow6432Node view like plain HKEY_LOCAL_MACHINE, while the 64-bit form writes to the native view.
Summary by CodeRabbit
- Bug Fixes
- Improved handling of 32-bit and 64-bit Windows registry paths in Steam install scripts. Registry values, including language settings, are now resolved according to the registry view specified by the path. This helps avoid using an incorrect registry location when processing scripts that reference either WOW64 registry hive.