32bit EOL mojave - client check ?

jameson
Contributor II

Is there somehow a tool/script etc to make a lookup on clients that have 32bit application installed, as it seems to be end of life running 32 bit

5 REPLIES 5

BOBW
Contributor II

HI @jameson I am currently using a self service script to populate a text file on the users desktop to show the 32 bit applications. Not sure who I stole this off or if I did it myself.......

hope it helps

#!/bin/bash

## Get the logged in user's username
loggedInUser=$( ls -l /dev/console | awk '{print $3}' )

if [ -e /Users/"$loggedInUser"/Desktop/non64bit.txt ]; then
rm -rf /Users/"$loggedInUser"/Desktop/non64bit.txt
fi

echo "-----------------------------------------------------------" >> /Users/"$loggedInUser"/Desktop/non64bit.txt
echo "DATE " >> /Users/"$loggedInUser"/Desktop/non64bit.txt


date >> /Users/"$loggedInUser"/Desktop/non64bit.txt
echo "-----------------------------------------------------------" >> /Users/"$loggedInUser"/Desktop/non64bit.txt
echo "See below all 32bit applications installed on your computer"
system_profiler SPApplicationsDataType | grep -B 6 -A 2 "(Intel): No" >> /Users/"$loggedInUser"/Desktop/non64bit.txt

echo "-----------------------------------------------------------" >> /Users/"$loggedInUser"/Desktop/non64bit.txt

sudo chmod 777 /Users/"$loggedInUser"/Desktop/non64bit.txt

exit 0

jameson
Contributor II

Thanks - So how do you as admin get those ? - go to each user and check the content of this file ?

alexjdale
Valued Contributor III

Well, you could edit that file down to just the app paths to shorten it, and then echo/cat them as a list for an extension attribute or policy log. It's not a user-centric command so you run it once for the whole system.

The_Lapin
New Contributor III

Thanks for the script @BOBW ! It worked well for us but we had some confusion as it listed some of the 32bit Apple apps. I modified it a bit to filter out the Apple apps, modified script below:

#!/bin/bash

## Get the logged in user's username
loggedInUser=$( ls -l /dev/console | awk '{print $3}' )

if [ -e /Users/"$loggedInUser"/Desktop/32BitApps.txt ]; then
rm -rf /Users/"$loggedInUser"/Desktop/32BitApps.txt
fi

echo "-----------------------------------------------------------" >> /Users/"$loggedInUser"/Desktop/32BitApps.txt
echo "DATE " >> /Users/"$loggedInUser"/Desktop/32BitApps.txt

date >> /Users/"$loggedInUser"/Desktop/32BitApps.txt

echo "32bit applications installed on your computer:" >> /Users/"$loggedInUser"/Desktop/32BitApps.txt
echo "-----------------------------------------------------------" >> /Users/"$loggedInUser"/Desktop/32BitApps.txt
system_profiler SPApplicationsDataType | grep -B 6 -A 2 "(Intel): No" >> /tmp/non64bit.txt
awk '/Obtained from: Apple/{for(x=NR-3;x<=NR+5;x++)d[x];}{a[NR]=$0}END{for(i=1;i<=NR;i++)if(!(i in d))print a[i]}' /tmp/non64bit.txt >> /tmp/filterednon64bit.txt
grep -B 6 -A 2 "(Intel): No" /tmp/filterednon64bit.txt >> /Users/"$loggedInUser"/Desktop/32BitApps.txt

echo "-----------------------------------------------------------" >> /Users/"$loggedInUser"/Desktop/32BitApps.txt

sudo chmod 777 /Users/"$loggedInUser"/Desktop/32BitApps.txt

rm -Rf /tmp/non64bit.txt
rm -Rf /tmp/filterednon64bit.txt

exit 0

BOBW
Contributor II

Nice, I'm going to steal cough cough "borrow" these updates
thanks