Need Script to read name of text file and report back in KBox

I need to be able to read the name of a text file located in a directory off of the C drive. The background is, we identify our computer images by the name of a text file located in C:\image\c21.txt. I would like to read this file name and build a report in Kace to determine which machine has what image.


0 Comments   [ + ] Show comments

Answers (2)

Posted by: jkatkace 11 years ago
Purple Belt
Create a custom field, per this video:


The function you want to use in your field is the "ShellCommandTextReturn()" function. Load it with a shell command that types out the value of that file...probably "type C:\image\c21.txt" will work.
Posted by: GillySpy 11 years ago
7th Degree Black Belt
JK's technique should be used most of the time.

For advanced users:
For complex shell commands or, more likely, one-time only commands (e.g. based on temporary information you want to track permanently) you can run something to get your data into the registry and then report from there. E.g. if the file c:\image\c21.txt was a temporary file
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login


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