I use this code to get the operating system temp directory, to extract attached file in my application. In every machine where your Notes apllication running, you need to know which is the drive and the dir to extract your temporary file. This code queries the system registry and retrieve the system temp directory on a Windows 2000 machine. I use this code in a computed field.
SysRoot:=@RegQueryValue ("HKEY_LOCAL_MACHINE";"SOFTWARE\Microsoft\Windows NT\CurrentVersion";"SystemRoot"); TmpDir:=@RightBack(@RegQueryValue ("HKEY_LOCAL_MACHINE"; "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; "TEMP");"%"); SysRoot+TmpDir
This was first published in November 2001