Getting the path of Windows TEMP directory from Minifilter

Hi!
I wanted to know whether there is a kernel API for getting the path of Windows TEMP directory.
Thanks!
Ayush Gupta
K7 Computing Pvt. Ltd.

TEMP has nothing to do with kernel mode.
Infact TEMP can be changed several times per logon
session, (it’s just a string user’s environment).

L.

Maybe the environment parameter - %temp% can help u.

xxxxx@yahoo.com wrote:

Hi!
I wanted to know whether there is a kernel API for getting the path of Windows TEMP directory.
Thanks!
Ayush Gupta
K7 Computing Pvt. Ltd.

The definition of the TEMP folder is the value of the environment
variables %TEMP% %TMP% %TMPDIR% and %TMPPATH% within the user mode PEB
of the process making the request. Which of these 4 variables are used
dependes on the specific program / dll / library code involved so most
users assign the same value to all 4 (or at least the first 2).

The default login-time value of these variables for a given user kan be
read from the registry under \REGISTRY\USERS\S-1-…\Environment, with
\REGISTRY\MACHINE\System\CurrentControlSet\Control\Session
Manager\Environment as the systemwide default. However it is not
uncommon for some programs to set a different value before launching
other programs.


Jakob Bøhm, M.Sc.Eng. * xxxxx@danware.dk * direct tel:+45-45-90-25-33
Danware Data A/S * Bregnerodvej 127 * DK-3460 Birkerod * DENMARK
http://www.netop.com * tel:+45-45-90-25-25 * fax tel:+45-45-90-25-26
Information in this mail is hasty, not binding and may not be right