lvdvelde
24th January 2003, 17:32
Hey everyone,

is there a way to find out - with the use of a Baan script - where the local Temp directory of user is located?
I need to know this, in order to use a server.to.client command, for transferring a file to the local PC (and run excel or so).

BW uses it's own installation directory as a working directory. Not every user has permission to write to that directory. This is why I want to use the local TEMP directory.

This piece of code stores the tempdir in the stdout file "tempdir":

app_id = app_start("cmd.exe /c /q set TEMP", "", "", "tempdir", "")

... but this only works if the user has permission to write to the BW directory... looks like a 'chicken-or-egg' problem!

Any help is appreciated!

Lex

gfasbender
24th January 2003, 18:27
How about using:

bse.tmp.dir$()

lvdvelde
24th January 2003, 18:38
bse.tmp.dir$() tells me the location of the temp dir on the Baan server, I meant the LOCAL temp directory, the one which Windows (and other applications) use.

Maybe there's a way to let BW use any other directory than it's own installation directory?

Lex

mark_h
24th January 2003, 19:55
Does this thread help (http://www.baanboard.com/baanboard/showthread.php?s=&threadid=7329&highlight=client+variables)? I was thinking you could use ${TEMP} - if this is a client environment variable.



Mark

lvdvelde
24th January 2003, 21:58
OK Mark, that helps. It seems to be possible to specify and access variables both on the server and the client side with the same ${...} syntax.

It is still not like the VB syntax for 'Environ', a function to read the value of Windows environment variables, but the ${...} can also work fine.

Thanks, Lex