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   [ - ] Hide Comments


Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
Answer this question or Comment on this question for clarity


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.
Answered 05/06/2010 by: jkatkace
Purple Belt

Please log in to comment
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
Answered 05/17/2010 by: GillySpy
Seventh Degree Black Belt

Please log in to comment