a change in Big Sur due to universal apps

Hello

I hope someone can help me

I have a small app to check if QuickTime Player is on the computer, because I control it with AppleScript.

I used

do shell script “ls /Applications”

and then looked to see if “QuickTime Player” was among the applications listed.

But Big Sur no longer lists universal apps in the above shell script.

Any ideas on how to see if Quicktime Player exists on the computer via AppleScript

thanks for the help
Kevin

Model: iMac (Retina 5K, 27-inch, Late 2014)
AppleScript: AppleScript 2.7
Browser: Safari 605.1.15
Operating System: macOS 10.14

First, it has nothing to do with universal apps – it’s the fact that Apple’s apps are stored separately. And I’m pretty sure they are on the read-only system partition, so they can’t be deleted — which makes the test unnecessary.

Thank you for the information.

I guess I can check to see if the computer is running Big Sur and then skip the script step.

I how do I check to see which Mac OS they are running

thanks again for the help

The simplest method is probably:

system version of (get system info)

Just be prepared for the fact that you might get “11.x” or “10.16”, depending on the host app.

QuickTime Player is located in /System/Applications in Catalina (and I suspect Big Sur), and it’s located in /Applications in earlier versions of macOS. So, one suggestion is:

set rootFolder to POSIX file "/" as text

tell application "System Events"
	if exists file (rootFolder & "System:Applications:QuickTime Player.app:") then
		set qtExists to true
	else if exists file (rootFolder & "Applications:QuickTime Player.app:") then
		set qtExists to true
	else
		set qtExists to false
	end if
end tell

qtExists --> true

I tested the above and it took 0.003 seconds to run. Shane’s suggestion is equally quick if you only need to know the macOS version number.