I have run into some installation problems with the new Sierra update.
I want to run a script that checks the version number and deletes a certain .mpkg file based on the version number because I am having a lot of customers running the wrong installation which is causing a lot of issues. I have tried multiple versions of this code and nothing seems to be working. My result in Applescript console is: “”.
Any help would be greatly appreciated.
tell application "Finder" set os_version to do shell script "sw_vers -productVersion" if ((os_version as string) is equal to "10.12") then do shell script (" rm -rf \"Step 1 Installer.mpkg\" ") else do shell script (" rm -rf \"Step 1 Installer (SIERRA ONLY).mpkg\" ") end if end tell