There's a registry key under HKML that contains a comma-separated list of drivers to load.
HKLM\Somewhere "InstalledDrivers" "foo,bar"
When installing our driver, we need to append an entry to this list so it becomes
HKLM\Somewhere "InstalledDrivers" "foo,bar,baz"
and on uninstall we need to pull just our entry away from the list, i.e. do a s/,baz// so it returns to it's original state
HKLM\Somewhere "InstalledDrivers" "foo,bar"
I can't just store the key on install and remove it on uninstall, because if other drivers get installed, the key might be "foo,bar,baz,bravo" - so it should become "foo,bar,bravo" after our driver gets uninstalled.
Oh and if ,baz is already in the list, it should not be added again.
How on earth do I wrestle WiX to manipulate keys like this?