Determine slack architecture type

JamfAdmin2
New Contributor II

Hello all,

I have received the best assistance with finding a script to determine users slack architecture type it is currently used as an extension attribute 

 

here is the script, I wanted to know if there is a way to adjust the script so it works more behind the scenes now it is using the lipo command which on a recurring check in a user will get a prompt to install the lip command and it takes about 40 min to complete is there a way to adjust the script so when a user turns on the computer it will already be ran so on jamf we can check the extension attribute section and tell us what version of slack they have wether it is intel, universal, or silicon 

 

basically is there another route i can go in the script that does not use the lipo command 

JamfAdmin2_0-1698168144586.png

 

6 REPLIES 6

McAwesome
Valued Contributor

You could steal the way the Installomator script handles it.

https://github.com/Installomator/Installomator/tree/main

JamfAdmin2
New Contributor II

where would that be in is it the code that is in installomator.sh? 

joshuasee
Contributor III

The Installomator fragment for Slack is using arch, but it isn't checking the Slack app, its checking the client configuration.

What about the file command? It has more complex output and more power than needed for this job, but it should work. 

(base) ~ $ file /Applications/Slack.app/Contents/MacOS/Slack
/Applications/Slack.app/Contents/MacOS/Slack: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit executable x86_64] [arm64:Mach-O 64-bit executable arm64]
/Applications/Slack.app/Contents/MacOS/Slack (for architecture x86_64): Mach-O 64-bit executable x86_64
/Applications/Slack.app/Contents/MacOS/Slack (for architecture arm64): Mach-O 64-bit executable arm64

 

my boss does not want to use that command we have been using the script i posted above that is what he wanted more but i just don't want to use the lipo command  we want a way to see the users slack architect type in jamf but more behind the scenes since when a user checks into their computer they are prompted to install the lipo command in order to see the slack architect type is there a way to modify the script so it does not give a user a prompt it can work more quietly? 

joshuasee
Contributor III

My recollection is that file doesn't require the XCode tools, unlike lipo, but I'm short on time to test. If you'll tolerate a more brittle and app specific option, the UB version of Slack has app-arm64.asar in its Resources folder, while the Intel version does not.

i will look into it thank you if you get time to test please share the results with me please (: