10-29-2021 12:11 AM - edited 10-29-2021 12:12 AM
I created a policy which executes the following command
'/Applications/Install macOS Monterey.app/Contents/Resources/startosinstall' --agreetolicense --nointeraction --forcequitapps
via the Files and Processes --> Execute Command field on Macs which are capable of Monterey and do have the installer downloaded.
Although the command is correct AND the Macs did the upgrade the logged result of the command is:
/bin/sh: /Applications/Install macOS Monterey.app/Contents/Resources/startosinstall: No such file or directory
Does anybody have an idea why?
It is misleading that the log shows "No such file or directory" although the command is run properly.
11-02-2021 07:02 AM - edited 11-02-2021 07:02 AM
What happens if you change it to:
/Applications/Install\ macOS\ Monterey.app/Contents/Resources/startosinstall
Posted on 11-02-2021 08:50 AM
Always drag your path into terminal and copy that output into your script/ exececute command.
Posted on 11-02-2021 09:15 AM
Posted on 11-03-2021 08:14 AM
11-02-2021 09:13 AM - edited 11-02-2021 09:13 AM
I haven't tested that yet but I will. Thank you.
Posted on 11-03-2021 04:37 PM
I cannot execute any command :(, sorry you will have the command you use in the MDM.
Posted on 11-05-2021 10:43 AM
I tested changing it but the error message is exactly the same.
Posted on 11-08-2021 09:42 AM
try removing the single quotes from your path.
Posted on 11-08-2021 11:01 PM
Posted on 11-09-2021 12:30 PM
Are you dragging the startosinstall into terminal directly and then pasting the path into your script/command?
Posted on 11-16-2021 01:04 AM
I did that, yes.
Posted on 11-16-2021 07:04 AM
11-15-2021 01:05 PM - edited 11-15-2021 01:33 PM
Posted on 01-08-2023 03:46 PM
Not sure it helps your case but FYI I ran:
/Applications/Install\ macOS\ Monterey.app/Contents/Resources/startosinstall --agreetolicense --nointeraction --forcequitapps
remotely through ARD and it did work. Of course, the central requirement is that the installer app exist in that location in the first place. Not a direct answer, but maybe a workaround if it helps anyone.
Posted on 01-08-2023 04:53 PM
UPDATE (should have tried this first before posting). So I had to make a policy to copy the dmg/app to the correct location anyway since JAMF is much faster than ARD with the file size. I tried making a "step 2" policy rigged to run after the 1st/copy that only did the exact cmd posted above, and success! Automatic updating underway. Is it possible your cmd was just running before your actual copy completed or anything? Anyway, that got things working for me.