views:

22

answers:

0

I am currently using RegistryKey.GetValue(string name, object defaultValue, RegistryValueOptions options) with RegistryValueOptions.DoNotExpandEnvironmentNames for the options value.

However, this is only valid when run on the local machine. Digging down via Reflector, I find it expands the strings locally. Which means that irrespective of the setting, the strings come down remotely already expanded.

Has anyone come across a solution to this that does not require running a process directly on the remote machine to get a REG_EXPAND_SZ value?

Update: I attempted to use WMI's StdRegProv provider to gain access, but it still expands the strings before sending them back.