/build/static/layout/Breadcrumb_cap_w.png

FileInfoReturn Custom Inventory property for Current User

I am trying to find the date of a file un the currently logged in users %%APPDATA% folder using a Custom Inventory rule:

FileInfoReturn(%appdata%\Microsoft\Templates\NormalEmail.dotm, "Date last saved" , DATE)

The issue is the KACE agent runs as the SYSTEM account so the rule in looking in the SYSTEM's APPDATA folder (C:\WINDOWS\system32\config\systemprofile\AppData).  Is there a variable to look in the Current logged on users %appdata% path?


0 Comments   [ + ] Show comments

Answers (2)

Posted by: Nico_K 3 days ago
Red Belt
1

no, there isn't.
But you can create a little script and catch the results via CIR

Posted by: Nick_F 3 days ago
Senior White Belt
1

Create a Script to run as the logged in user on a schedule and run something like: (Get-ChildItem $env:appdata\Microsoft\Templates\NormalEmail.dotm | Sort {$_.LastWriteTime}).LastWriteTime | Out-File C:\temp\msTemplate.txt

Then setup a custom inventory rule to collect the data:  ShellCommandTextReturn(cmd /c type C:\temp\msTemplate.txt)

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ