Jeff,
The call to the SystemDirectory property will make a call to the
GetSystemDirectory API function underneath the covers. This is fine if you
just want to get the system directory and nothing else. If you want to
translate strings that have the values in it for the systemroot and other
directories, it's better to call the function I mentioned before and have
the OS do it for you.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"jeffc" <no****@nospam.comwrote in message
news:OK****************@TK2MSFTNGP04.phx.gbl...
>
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.comwrote
in message news:Om**************@TK2MSFTNGP04.phx.gbl...
> I believe that you want to call the PathUnExpandEnvStrings API
function through the P/Invoke layer. This is located in shlwapi.dll.
While not %systemroot% exactly, but I was able to find
System.Environment.SystemDirectory. This might be "C:\Windows\system32",
for example.