What is the syntax equivalent of %temp% Windows machine?

(imported topic written by flayofish91)

Writing a relevance statement and not sure what the correct syntax is for %temp% in Windows (c:\documents and settings\userid\AppData\Local\Temp folder).

example: exists file “samplefile.tmp” of %temp% folder

What do I replace the %temp% with?

-thanks

Edit: While I’m at it, what is the %AppData% syntax? Better yet, is there a site or document with a table lining out all the Windows variables?

-thanks

(imported comment written by flayofish91)

Well, I found the proper syntax for the %temp%, however I’m still curious if there is a list out there that describes how to code for Windows variables.

Here is what I set for the %temp%, incase anyone else runs into this issue:

exists files (“C:\Documents and Settings” & name of current user & “\appdata\local\temp\testfile.tmp”)

-thanks

(imported comment written by NoahSalzman)

Q: exists file “wmsetup.log” of folder (expand environment string of “%25temp%25”)

A: True

q: pathname of file “wmsetup.log” of folder (expand environment string of “%25temp%25”)

A: C:\Users\NOAHSA~1\AppData\Local\Temp\wmsetup.log

q: expand environment string of “%25ALLUSERSPROFILE%25”

A: C:\ProgramData

q: expand environment string of “%25AppData%25”

A: C:\Users\Noah Salzman\AppData\Roaming

q: expand environment string of “%25temp%25”

A: C:\Users\NOAHSA~1\AppData\Local\Temp

(imported comment written by SystemAdmin)

Noah,

This seems to work in the debugger but not when run on the agent. Are there ways of enumerating the current users environment variables when run on the agent? If not, can we get a feature request to add some relevance variables? Trying to address the current user is quite a bit of a pain - having some built in enumeration would be killer.

John

(imported comment written by NoahSalzman)

jspanitz… is this post – http://forum.bigfix.com/viewtopic.php?id=8543 – an indication that you worked around the core issue? Should we move the conversation there?

(imported comment written by SystemAdmin)

Right. We are working around them. Let’s continue over there, but don’t loose my request :wink: