/build/static/layout/Breadcrumb_cap_w.png

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)

Posted by: Nico_K 5 years ago
Red Belt
0

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
Red Belt
0

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
 
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