How to use System variable (%appdata%) in file path for custom inventory?
Hello All,
I am trying to create a custom inventory by using ShellCommandTestReturn, but it's not working. Here is the command syntax;
ShellCommandTextReturn(cmd /c type %APPDATA%\Thunderbird\profiles.ini)
Also tried, ShellCommandTextReturn(cmd /c type "%APPDATA%\Thunderbird\profiles.ini")
I think the issue is using system variable %AppData% in the file location.
Any suggestion?
Thank you
Answers (1)
The logic behind it seems not plausable.
The %appdata% path variable is in the user context, so it will be changing constistantly, a CIR wont cut it.
A KScript where you woud monitor all userpaths with foreach user in user woud be better. If you're useing a static enviroument it woud be feasable task to monitor the main user and look specific for this user and print it in a text file or user the specific path for the main user in a CIR.