Skip to main content
Question

Upgrading to Monterey remotely and automatic

  • October 29, 2021
  • 15 replies
  • 59 views

Forum|alt.badge.img+10

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.

15 replies

Forum|alt.badge.img+10
  • Contributor
  • 91 replies
  • November 2, 2021

What happens if you change it to:

 

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

 

 


bwoods
Forum|alt.badge.img+14
  • Honored Contributor
  • 473 replies
  • November 2, 2021

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. 


Forum|alt.badge.img+10
  • Author
  • Valued Contributor
  • 71 replies
  • November 2, 2021

What happens if you change it to:

 

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

 

 


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


Forum|alt.badge.img+10
  • Author
  • Valued Contributor
  • 71 replies
  • November 2, 2021

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?


bwoods
Forum|alt.badge.img+14
  • Honored Contributor
  • 473 replies
  • November 3, 2021

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


Correct.


Forum|alt.badge.img+4
  • New Contributor
  • 5 replies
  • November 3, 2021

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


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


Forum|alt.badge.img+10
  • Author
  • Valued Contributor
  • 71 replies
  • November 5, 2021

What happens if you change it to:

 

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

 

 


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


bwoods
Forum|alt.badge.img+14
  • Honored Contributor
  • 473 replies
  • November 8, 2021

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


try removing the single quotes from your path.


Forum|alt.badge.img+10
  • Author
  • Valued Contributor
  • 71 replies
  • November 9, 2021

try removing the single quotes from your path.


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


bwoods
Forum|alt.badge.img+14
  • Honored Contributor
  • 473 replies
  • November 9, 2021

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?


Forum|alt.badge.img+3
  • New Contributor
  • 4 replies
  • November 15, 2021

EDIT


Forum|alt.badge.img+10
  • Author
  • Valued Contributor
  • 71 replies
  • November 16, 2021

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


I did that, yes.


Forum|alt.badge.img+10
  • Contributor
  • 91 replies
  • November 16, 2021

I did that, yes.


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

 


Forum|alt.badge.img+1
  • New Contributor
  • 7 replies
  • January 8, 2023

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.


Forum|alt.badge.img+1
  • New Contributor
  • 7 replies
  • January 9, 2023

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.


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.