>>>There is little I can find on this WIN32API function as it pertains to anything other than C++. Any thoughts as to its arguments or an alternative means to achieving the same result? The aim is to get the "windows" directory.Thank you in advance.
>>
>>There's an entry in the FAQ that I wrote, FAQ#7806, that gives an exact implementation of this in VFP. It's under
Win32 and Other APIs>
>And there's also GETENV('WINDIR'). However, I don't know if it's reliable under NT.
GETENV() works, but IMO is not the preferred method to use, since the environment variable can be changed by batch files or scripts. It's particularly suspect when issued from a spawned process, where the parent process may have mucked with the environment inherited by the child.