Add support for REG_EXPAND_SZ in set_registry_variables().