Posted on 09-20-2018 10:30 AM
I've been trying to get MSUPDATE 4.3 working via command line. I should mention that I had all kinds of issues with MAU 4.1 and 4.2 as well. After trying @pbowden's script and not having any luck, I thought I would just simplify things and just use the single line to install updates for all installed Office products.
This works as expected if I log into a machine with local admin and run it. However, when I make this a script in Jamf and then call it, it errors out every time. Anyone else seeing this kind of behavior?
Here is my script:
#!/bin/sh
cd /Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS
./msupdate --install
and here is the output from running the above script on a machine:
Script result: RegisterApplication(), FAILED TO establish the default connection to the WindowServer, _CGSDefaultConnection() is NULL. 2018-09-20 03:04:25.790 msupdate[28666:289450] -[NSCFConstantString objectAtIndex:]: unrecognized selector sent to instance 0x7fff9d0157d8 2018-09-20 03:04:25.792 msupdate[28666:289450] Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSCFConstantString objectAtIndex:]: unrecognized selector sent to instance 0x7fff9d0157d8' First throw call stack: ( 0 CoreFoundation 0x00007fff42f892db exceptionPreprocess 171 1 libobjc.A.dylib 0x00007fff6a130c76 objc_exception_throw 48 2 CoreFoundation 0x00007fff43021db4 -[NSObject(NSObject) doesNotRecognizeSelector:] 132 3 CoreFoundation 0x00007fff42eff820 ___forwarding 1456 4 CoreFoundation 0x00007fff42eff1e8 _CF_forwarding_prep_0 120 5 AE 0x00007fff4404903e _Z23aeBroadcastForRecordingPK11AEEventImpl 304 6 AE 0x00007fff44036d0f _ZL10sendToSelfPK6AEDescPS_il 615 7 AE 0x00007fff4400ac2f AESendMessage 1697 8 msupdate 0x0000000105355dee CaseInsensitiveSetContainsString 41992 9 msupdate 0x0000000105355c10 CaseInsensitiveSetContainsString 41514 10 msupdate 0x0000000105356085 CaseInsensitiveSetContainsString 42655 11 msupdate 0x000000010535612d CaseInsensitiveSetContainsString 42823 12 msupdate 0x00000001052c7373 main 10209 13 msupdate 0x00000001052c66e5 main 6995 14 msupdate 0x00000001052c69ee main 7772 15 msupdate 0x00000001052c4f18 main 902 16 libdispatch.dylib 0x00007fff6ad185fa _dispatch_call_block_and_release 12 17 libdispatch.dylib 0x00007fff6ad10db8 _dispatch_client_callout 8 18 libdispatch.dylib 0x00007fff6ad25217 _dispatch_queue_serial_drain 635 19 libdispatch.dylib 0x00007fff6ad18166 _dispatch_queue_invoke 373 20 libdispatch.dylib 0x00007fff6ad25f0d _dispatch_root_queue_drain_deferred_wlh 332 21 libdispatch.dylib 0x00007fff6ad29d21 _dispatch_workloop_worker_thread 880 22 libsystem_pthread.dylib 0x00007fff6b061fd2 _pthread_wqthread 980 23 libsystem_pthread.dylib 0x00007fff6b061be9 start_wqthread 13 ) libc++abi.dylib: terminating with uncaught exception of type NSException Detecting and downloading updates... /Library/Application Support/JAMF/tmp/MSUPDATE Cmd: line 4: 28666 Abort trap: 6 ./msupdate --install Error running script: return code was 134.
Posted on 10-03-2018 10:23 AM
@hkabik thanks, does this mean that you aren't using the pbowden script and just calling the command line? If so, would you be cool with posting a screenshot of how your policy is configured. I would love to give it a try here too. Thanks!
Posted on 10-03-2018 10:36 AM
Yeah, until this is sorted I'm forgoing Paul's script and just running the simplest of simple scripts for this one.
#!/bin/sh
/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate --install
sleep 5
/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate --install
That's legit all I'm doing for right now and so far it's working. I have that scoped to a smartgroup of users needing the latest Office update and it's doing it's job. Blunt and ugly... but at least it's working.
Posted on 10-03-2018 10:55 AM
@hkabik well I'm gonna follow your lead and try this as well. It is truly bizarre if this works as it doesn't do anything to register the apps for MAU as far as I know (pbowden's script does that part too). The mystery continues...
Posted on 10-03-2018 11:07 AM
@hkabik no dice for the double command method for me. Had the same error I had in my first post of this thread. Back to the drawing board...
Posted on 10-03-2018 11:13 AM
It's somehow even weirder that this works for me and not you.
Keep in mind, you still get that error in the logs from the first run through. But for me, the second run works. I do believe it still shows the policy as a failure though.
You may want to double check that both of your commands failed, not just the first.
Posted on 10-03-2018 11:19 AM
Yeah it looks like both of them failed for me. I just tried going back to the pbowden script and just setting it to trigger at login. That runs clean although only seems update Word for the time being and nothing else as it doesn't think anything else needs to be updated. However, my Jamf Patch Management section indicates otherwise.
Posted on 02-19-2019 08:33 AM
This works for me but you'll still get that same error if nobody is logged in. You'll have to find a way to log into all those computers remotely
LoggedInUser=$(ls -l /dev/console | /usr/bin/awk '{ print $3 }')
sudo -u $LoggedInUser /Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate --install
Posted on 05-21-2019 01:00 PM
Anyone get this to work via Self Service?
Posted on 05-21-2019 01:06 PM
@DJC You really should try @pbowden's msupdatehelper as it makes keeping Office for Mac update via Jamf Pro incredibly easy. There's a link to a video training for it on that page.
Posted on 10-11-2019 07:55 AM
I am having this exact same problem - both trying to just run the simple 1 liner and also when trying to run pbowdens msupdatehelper script. Did anyone ever find a solution?
Here is the log (pbowdens script)
Executing Policy Update Office for Mac apps
Running script MSupdate...
Script exit code: 0
Script result: User is logged in
Detecting and downloading updates...
No updates applied
Detecting and downloading updates...
No updates applied
Detecting and downloading updates...
No updates applied
Detecting and downloading updates...
No updates applied
Detecting and downloading updates...
No updates applied
Detecting and downloading updates...
No updates applied
Running command /Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate --install...
Result of command:
2019-10-11 10:51:02.945 msupdate[26318:409477] -[NSCFConstantString objectAtIndex:]: unrecognized selector sent to instance 0x7fff8f0fd040
2019-10-11 10:51:02.946 msupdate[26318:409477] Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSCFConstantString objectAtIndex:]: unrecognized selector sent to instance 0x7fff8f0fd040'
First throw call stack:
(
0 CoreFoundation 0x00007fff337b3d63 exceptionPreprocess 250
1 libobjc.A.dylib 0x00007fff696a2bd4 objc_exception_throw 48
2 CoreFoundation 0x00007fff3383e206 -[NSObject(NSObject) __retain_OA] 0
3 CoreFoundation 0x00007fff3375a51b ___forwarding 1427
4 CoreFoundation 0x00007fff33759ef8 _CF_forwarding_prep_0 120
5 CoreFoundation 0x00007fff336f3f3e CFArrayContainsValue 197
6 HIServices 0x00007fff3197bb79 TransformProcessType 927
7 AppKit 0x00007fff30957c5a -[NSApplication setActivationPolicy:] 67
8 msupdate 0x000000010e438706 main 122
9 libdyld.dylib 0x00007fff6aa01405 start 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Posted on 02-25-2020 11:54 AM
Why not just try
#!/bin/sh
su - $(stat -f%Su /dev/console) -c "/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate -i"