Thursday, October 7, 2004, 9:17:28 AM, Kenneth wrote:

> Changing a process wide variable like that seems a bit drastic. I'd be
> concerned about what effect that might have on all the other things running
> under iis.  For example, some of them might be running as different users
> who might not have access to the path.

Your program can set the TMP environment variable for just your
process.

http://msdn.microsoft.com/library/en-us/dllproc/base/setenvironmentvariable.asp?frame=true

> The SetEnvironmentVariable function sets the contents of the
> specified environment variable for the current process.
> 
> BOOL SetEnvironmentVariable(
>   LPCTSTR lpName,
>   LPCTSTR lpValue
> );
> 
> Parameters
> 
> lpName
>     [in] Pointer to a null-terminated string that specifies the name of the 
> environment variable. The operating system creates the environment variable if it 
> does not exist and lpValue is not NULL.
> lpValue
>     [in] Pointer to a null-terminated string that specifies the contents of the 
> environment variable. An environment variable has a maximum size limit of 32,767 
> characters, including the trailing null terminator.
> 
>     If this parameter is NULL, the variable is deleted from the current process's 
> environment.
>
> Return Values
> 
> If the function succeeds, the return value is nonzero.
> 
> If the function fails, the return value is zero. To get extended
> error information, call GetLastError.
>
> Remarks
> 
> This function has no effect on the system environment variables or the environment 
> variables of other processes. 

e

> -----Original Message-----
> From: D. Richard Hipp [mailto:[EMAIL PROTECTED] 
> Sent: 07 October 2004 13:56
> To: [EMAIL PROTECTED]
> Subject: Re: [sqlite] sqlite3_temp_directory

> MacLeod, Kenneth wrote:
>> Is there any way to change the sqlite3_temp_directory global?  I'm running
>> sqlite under iis and the user doesn't have write access to their temp
>> directory.
>> 

> On windows you can leave sqlite3_temp_directory alone (leave it as NULL)
> and set the TMP environment variable to the directory you want to use.



Reply via email to