Here's my trade secret: Don't listen to
@pseymour, he's knee deep in the
ProcMon Mafia...
1. Download NirSoft's
RegistryChangesView.
2. Prep whatever Windows UI-based change is about to happen, but don't click OK. You want to keep the capture time as short as humanly possible, to prevent capturing too many background changes that Windows makes for itself, or related to you simply clicking around the desktop.
3. Run RegistryChangesView. If you have a previous capture folder, I usually delete it before opening RegistryChangesView. The tool can source between different capture points, but for simplicity just keep it plain and stupid.
4. Click the Create Registry Snapshot button in the top right of the popup. Repeat with the next button.
5. Invoke the pending Windows change by hitting OK.
6. Immediately return to RegistryChangesView and hit OK. Now it creates a pending diff between the first snapshot and when you clicked OK.
7. You can search for changes on the scroll list. I like to Select All, then right-menu Copy As .Reg File Format.
8. Browse and try to be intelligent about which change(s) are actually relevant.
UWP apps don't store their metadata in the Windows registry, so RegistryChangesView is useless for those apps. You have to "reg load" their private registry hives under the AppData\Local\Packages\[App] folders.
I don't have a laptop for testing Airplane mode. But presumably Settings looks for some Wi-Fi device instance, and begins changing a set of reg values related to that device.
So it becomes a two-fold problem:
- Deciphering how you find the same device instance by browsing other registry keys (or by using PS cmdlets and WMI objects).
- After determining the relative registry path for the user's instance, applying the same set of changes.
You may have to reset the capture (I do it so there's no accidental confusion because you diff'ed the wrong set of older snapshots), and reverse the Airplane mode to see what the changes are in the opposite direction.
If you search I see a lot of advice for making a functionally equivalent change (ie. disabling the Wi-Fi network, or stopping the Wireless service), but in the end they're probaly not a faithful duplicate of what Settings has done.