My PATH variable contains other enviornment variables. For example: My PATH is "%SOME_PATH %; C:\windows\ ..." and i have the varibale "SOME_PATH" which is.."C:\SomePat h"..
When i run this code:
I get "C:\SomePath;C: \windows\ ..." instead of "%SOME_PATH %; C:\windows\ ..."
How do i get the unresolved environment variable?
When i run this code:
Code:
using (Microsoft.Win32.RegistryKey l_key = Microsoft.Win32.Registry.LocalMachine.OpenSubKey(@"System\CurrentControlSet\Control\Session Manager\Environment", false))
{
return (l_key.GetValue("PATH") as String);
}
How do i get the unresolved environment variable?
Comment