@RegQueryValue

@ReqQueryValue cannot be used to get the Windows Temporary Directory.This is a problem, because MS have changed the folders so that you cannot right to the Root folder of the C:\ drive.

According to Microsoft website, the correct temporary location can be obtained by using the following Registry Key:

tempDir:= @RegQueryValue(“HKEY_LOCAL_MACHINE” ; “SYSTEM\CurrentControlSet\Control\Terminal Server” ; “PerSessionTempDir”);

However this registry entry is kinda ‘hidden’ or the icon for it in the registry is like a blue data, perhaps indicating it’s a binary type or something?

Other registry keys in the same folder can be obtained, these ones have an icon that is ‘red letters’ and on the right hand side in the registry the value is displayed.

An alternative is this registry entry:

tempDir:= @RegQueryValue(“HKEY_CURRENT_USER” ; “Environment” ; “TEMP”);

But this returns to Lotus Notes:

%USERPROFILE%\AppData\Local\Temp

e.g. the %USERPROFILE% is not resolved…

Subject: Use the Environ function

If you can use Lotusscript then use the Environ function to get the OS environment variable that stores the Temp directory path info.

Example:

tempDir = Environ(“Temp”)