Upgrading to Monterey remotely and automatic

j_meister
Contributor

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.

13 REPLIES 13

AtillaTheC
New Contributor III

What happens if you change it to:

 

/Applications/Install\ macOS\ Monterey.app/Contents/Resources/startosinstall

 

 

Always drag your path into terminal and copy that output into your script/ exececute command. 

@bwoods You recommend this to get rid off formatted text, right?

Correct.

I haven't tested that yet but I will. Thank you.

konfio
New Contributor II

I cannot execute any command :(, sorry you will have the command you use in the MDM.

I tested changing it but the error message is exactly the same.

try removing the single quotes from your path.

I did that like @AtillaTheC suggested but that did not help.

Are you dragging the startosinstall into terminal directly and then pasting the path into your script/command?

I did that, yes.

AtillaTheC
New Contributor III

check a reply I made to another post with a working script

 

Will92
New Contributor II

EDIT