I want to extend the current PATH variable with a C# program. Here I have several problems:
Using GetEnvironmentVariable(\"PATH\", EnvironmentVariable
You can use WMI to retrieve the raw values (not sure about updating them though):
ManagementObjectSearcher searcher = new ManagementObjectSearcher("select * from Win32_Environment WHERE Name = 'PATH'");
foreach (ManagementBaseObject managementBaseObject in searcher.Get())
Console.WriteLine(managementBaseObject["VariableValue"]);
Check WMI Reference on MSDN