Hello, over the past years I fetched the environment variables from the registry keys System: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\ User: HKEY_CURRENT_USER\Environment\ However not all variables are retrieved i.e. SystemRoot is missing. GetEnvironmentStrings() appears to be the right win-function to call, however the comment confuses me:
"Do not use the return value of GetEnvironmentStrings to get or set environment variables. Instead, use the GetEnvironmentVariable and SetEnvironmentVariable functions to access the environment variables within this block. When the block is no longer needed, it should be freed by calling FreeEnvironmentStrings." How can I get all environment variables reliable? I need to store them temporarily and pass them later on as environment block to CreateProcess(). Is it save to call GetEnvironmentVariable() on each returned name? Thanks in advance, Arno Garrels _______________________________________________ Delphi mailing list -> [email protected] http://www.elists.org/mailman/listinfo/delphi

