Use the RegistryValueOptions.DoNotExpandEnvironmentNames flag with the RegistryKey.GetValue(string, object, RegistryValueOptions) method overload.
| Member Name | Description |
|---|---|
| DoNotExpandEnvironmentNames |
A value of type RegistryValueKind.ExpandString is retrieved without expanding its embedded environment variables. |
| None |
No optional behavior is specified. |