Help with Windows relevance

(imported topic written by SystemAdmin)

Hi all,

Could anybody here give me some help/pointers with relevance to remmediate an issue we’ve started getting here. Let me start by saying that my knowledge of Windows and Inspectors for Windows is very limited.

I need to ensure that a printer ini file sticks to a standard file. No problem there - I’ve got the file on the B.F. server and the sha1, etc to download it. My problem is - how do I formulate the correct relevance for the application folder of the current user? Something along the lines of :-

application_folder of current user & “Xerox\XrxWmV5.ini”

to create the string “D:\Documents And Settings\username\Application Data\Xerox\XrxWmV5.ini”

I also need to monitor/report every time the ini file changes and therefore has to be remmediated. Is there some session relevance that I can use in Web Reports that can tell me every time/date the fixlet has become relevant or would I need to scan the client log with an analysis?

Thanks (in advance) for any help

Mark.

(imported comment written by NoahSalzman)

You are looking for the %APPDATA% environment string. Note that you have to “percent encode” the percent symbol. Also, note that on my Win2008 system the appdata env variable has a different path than on WinXP.

q: operating system

A: Win2008 6.0.6002

q: expand environment string of “%25USERPROFILE%25” as string & “\foo”

A: C:\Users\Administrator\foo

q: expand environment string of “%25APPDATA%25” as string & “\foo”

A: C:\Users\Administrator\AppData\Roaming\foo

Edit: it occurs to me that you are looking for the logged in user’s appdata… which will require a different approach. Let’s see if someone else chimes in.

(imported comment written by SystemAdmin)

This thread should help you get started to get the logged on user’s appdata folder.

http://forum.bigfix.com/viewtopic.php?id=4228

Paul

(imported comment written by SystemAdmin)

Thanks for your help gents…