Custom Inventory Rule using a Windows System Command
I am trying to create custom inventory rule using ShellCommandTextReturn running the command Query user. I cannot get it to run no matter now I try. What I am trying to accomplish is identify the following:
Is anyone logged in?
Who is logged in?
Are multiple people logged in? If so, Who?
Thanks!
0 Comments
[ + ] Show comments
Answers (2)
Please log in to answer
Posted by:
Nico_K
5 years ago
can you please show what you are trying?
The best way to run a Windows Command in a CIR is using the cmd interpreter:
(like ShellCommandTextReturn(cmd /c net user) ) so the comman you are trying to run is running in the right environment.
(cmd /c simply does not show the command window)
Comments:
-
Thank you, this shows me the local user accounts created on the machine, but not what users are currently logged in. - amwoods 5 years ago
Posted by:
SMal.tmcc
5 years ago
you need ShellCommandTextReturn(cmd /c Query user)
Comments:
-
Exactly! But it doesn't run when machines check in. It runs fine manually from command line. - amwoods 5 years ago
-
it is a sysnative problem you are running into. query.exe does not exist in the 32bit system directory "syswow64" so the 32 bit kace client cannot find the file to run. - SMal.tmcc 5 years ago