title: Expand Registry Environment Variable Strings on Remote Machine
body: <p>After calling <code>RegConnectRegistry(...)</code> to open the registry on a remote machine, is it not possible to expand environment variables? I have looked at <code>ExpandEnvironmentStrings</code> and <code>ExpandEnvironmentStringsForUser</code>, but that only appears to be useful on the local machine. I think it must be possible considering that <code>RegistryKey.GetValue()</code> in .NET does expand the variables after calling <code>RegistryKey.OpenRemoteBaseKey()</code>, but I need to do this outside of .NET.</p>
  <p>Any ideas?</p>