Expand Registry Environment Variable Strings on Remote Machine
After calling 开发者_开发问答RegConnectRegistry(...)
to open the registry on a remote machine, is it not possible to expand environment variables? I have looked at ExpandEnvironmentStrings
and ExpandEnvironmentStringsForUser
, but that only appears to be useful on the local machine. I think it must be possible considering that RegistryKey.GetValue()
in .NET does expand the variables after calling RegistryKey.OpenRemoteBaseKey()
, but I need to do this outside of .NET.
Any ideas?
Given that the environment variables running in a given process is based on the currently logged on user, how would you determine the set of environment variables that would be active on the remote machine?
Even if you could read that information (it's in the registry after all), what would you do about processes that change their environment?
精彩评论