Environment versions
Network:
Windows 2000 Server
Below is a procedure that we use to find everyone's temp folder.
PROCEDURE FindGlobalTempPath
* Find our home directory. It won't always be on the C: drive. This code is
* lifted from the July 2001 FoxTalk in the "Reusable Tools: Going Ape Over the
* Win32 API" article. Returns a path for temp file storage, either on the
* local machine, or on the Citrix server if citrix client.
IF TYPE("globalTempPath")="U".OR.TYPE("globalTempPath")="L"
PUBLIC globalTempPath
globalTempPath = SPACE( 260 )
DECLARE INTEGER GetTempPath in Win32API integer nLength, string @szBuffer
GetTempPath( 260, @globalTempPath )
globalTempPath = ADDBS( LEFT(globalTempPath, AT(CHR(0), globalTempPath) - 1))
CLEAR DLLS
ENDIF
ENDPROC
We just make sure to call the procedure in the beginning of our setup code and then any time we want to save to a temporary file we use the globalTempPath varaible for placement.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only