Scripting Question

How to use System variable (%appdata%) in file path for custom inventory?

10/01/2020 189 views

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

0 Comments   [ + ] Show comments


All Answers


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. 

Answered 10/06/2020 by: mamabox
Senior White Belt

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