Searching for Applications installed in a users Download Folder

casareanderson
New Contributor III

Hey i have a strange issue with Sketch ,as the application is not stored in the application folder does any one have a way where i can find out who has the application downloaded in there download folder

1 ACCEPTED SOLUTION

AVmcclint
Honored Contributor

The least complicated way:
JSS > Settings>Computer Management>Inventory Collection>Software
Add a line for ~/Downloads and that will include everyone's Downloads folder in the daily inventory. After a day or so you can do an Application search in JSS for whatever app you're looking for. The resulting list will tell you who all has that app installed. You'll have to drill down and look at each computer's list of applications to see the path where it is installed.

The complicated way would be to build an Extension Attribute to specifically search ~/Downloads for anything with *.app and then create a smart group based on that.

View solution in original post

5 REPLIES 5

AVmcclint
Honored Contributor

The least complicated way:
JSS > Settings>Computer Management>Inventory Collection>Software
Add a line for ~/Downloads and that will include everyone's Downloads folder in the daily inventory. After a day or so you can do an Application search in JSS for whatever app you're looking for. The resulting list will tell you who all has that app installed. You'll have to drill down and look at each computer's list of applications to see the path where it is installed.

The complicated way would be to build an Extension Attribute to specifically search ~/Downloads for anything with *.app and then create a smart group based on that.

RyanSlater
New Contributor III

If you do add ~/Downloads to the inventory it might be a good idea to remove it again shortly after you find what you're after to save the clogging up the database a bit - depending on your organisation size and use case.

apizz
Valued Contributor

This is the EA we use to gather this info:

#!/bin/sh

# Function to get list of Apps and their full paths
APPS () {
    for APP in /Users/*/Downloads/*.app; do
        /bin/echo $APP
    done
}

/bin/echo "<result>$( APPS )</result>"

exit

We do something similar for PKGs and DMGs in users' Downloads folder and on the Desktop.

chuck3000
Contributor

I add /Users/ instead of just the user's downloads. Of course you can limit it to just ~ so it's only the active user.
The problem we've found is that users have apps in their Downloads, Desktop, ~/Applications (or called My Apps or something else). This does take longer for inventory to complete but at least I have a complete inventory.

yoopersteeze
New Contributor II

Took the above from @aporlebeke and added the username at login variable

#!/bin/sh
#Get the logged in user
user=$(ls -l /dev/console | awk '/ / { print $3 }')

# Function to get list of DMGs and their full paths
DMG () {
    for DMG in /Users/$user/Downloads/*.dmg; do
        /bin/echo $DMG
    done
}

/bin/echo "<result>$( DMG )</result>"

exit