/build/static/layout/Breadcrumb_cap_w.png

Installed software for specific users

I've been going round and round and can't get it right.  Anyone run a report like this before?  I have a list of users that I need to get a list of installed software per user, if that makes sense.

1 Comment   [ + ] Show comment
  • What is your method for mapping users to devices? last user logged in? Assignee name?
    What if a user is associated with two devices? Do you want a list for each device, or a consolidated list? - JasonEgg 5 years ago
    • Assignee name. We have a few instances of dual devices to one individual, consolidated would be fine. Appreciate the comment. - hcjdm 5 years ago

Answers (2)

Answer Summary:
Posted by: JasonEgg 5 years ago
Red Belt
1

Top Answer

This report may be HUGE and take a while, depending on your environment. I would test it in a reporting app before creating a report on the box and/or include a LIMIT clause.
SELECT DISTINCT 
  USER.USER_NAME, 
  SOFTWARE.DISPLAY_NAME, 
  SOFTWARE.PUBLISHER, 
  SOFTWARE.DISPLAY_VERSION
FROM   MACHINE
       JOIN MACHINE_SOFTWARE_JT JT ON MACHINE.ID = JT.MACHINE_ID
       JOIN SOFTWARE ON JT.SOFTWARE_ID = SOFTWARE.ID
       JOIN ASSET ON ASSET.MAPPED_ID = MACHINE.ID
       JOIN USER ON USER.ID = ASSET.OWNER_ID
WHERE  INVENTORY_RULE IS NULL
You will probably want to add criteria to the WHERE clause in order to get a more meaningful list.

That query will not report software of any computer that doesn't have an assignee. Here is a query to find devices that do not have an assignee:
SELECT MACHINE.ID,
  MACHINE.NAME,
  MACHINE.USER_LOGGED
FROM   MACHINE
       JOIN ASSET ON ASSET.MAPPED_ID = MACHINE.ID
WHERE  ASSET.OWNER_ID = 0
ORDER BY MACHINE.NAME

Comments:
  • This seems to have worked. Thank you! You were right, it is huge and will take some cleanup but follow-up question, how would I add a Where username = user to limit the results to specific people? Would that work? - hcjdm 5 years ago
    • Yep. You can add "AND USER.USER_NAME = 'Jason'" to the end of that query to run it for a specific user - JasonEgg 5 years ago
      • Nice, thank you! - hcjdm 5 years ago
Posted by: BRUNOPEREIRA 1 year ago
Senior White Belt
0
Hello! I'm looking for something along those lines, but I'm following the code above and it doesn't work.Thanks

Don't be a Stranger!

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

Sign up! or login

Share

 
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