>getenv("windir") will return the path of windows (c:\winnt). You just have to add The "\system32" part ...
Don't use the environment variables - they can be changed. There are API calls that will retrieve the Windows, system and temporary directories, as well as methods to retrieve this information from the Special Folders collection of the Shell.Application object. All of the above are far more reliable than hitting the environment variable strings.
See the FAQ and Win32 API section of UT for details.