Custom inventory Rule Query
Hi
Is it possible to create a custom inventory field which contains the contents of a file?
I have done this with a registry value using - RegistryValueReturn()
Is there a similiar command for text files, the file would only contain a single line of text.
Thanks
Is it possible to create a custom inventory field which contains the contents of a file?
I have done this with a registry value using - RegistryValueReturn()
Is there a similiar command for text files, the file would only contain a single line of text.
Thanks
0 Comments
[ + ] Show comments
Answers (5)
Please log in to answer
Posted by:
rmeyer
12 years ago
you can find the enviroment variables in here via registry
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment
*edit* this is only system enviroment variables, not user, also remember the agent runs as SYSTEM, not the logged on user that could be why it won't return %USERNAME% *edit*
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment
*edit* this is only system enviroment variables, not user, also remember the agent runs as SYSTEM, not the logged on user that could be why it won't return %USERNAME% *edit*
Posted by:
dchristian
12 years ago
Posted by:
PG_t4ttyt3ddy
12 years ago
Hi
Thanks for a speedy response. That would work a treat, only I have since realised that the file I wish to see resides in the APPDATA directory of the users directory, and unfortunately the environment variable %username% won't work. Does anyone know a way around the environment variable issue, or when KACE plan to allow the usage of env variables in a custom inventory rule.
Thanks
Thanks for a speedy response. That would work a treat, only I have since realised that the file I wish to see resides in the APPDATA directory of the users directory, and unfortunately the environment variable %username% won't work. Does anyone know a way around the environment variable issue, or when KACE plan to allow the usage of env variables in a custom inventory rule.
Thanks
Posted by:
ms01ak
12 years ago
Posted by:
snissen
12 years ago
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.