Blocking the Messages App on laptops

Kthelin
New Contributor II

Is there a configuration to somehow block the messages app on the laptops?

22 REPLIES 22

ClarkPoole
New Contributor

Could you not simply us the Restricted Software and Block the Proceess?

Set it to "kill' instead of delete would be my recommendation.

freddie_cox
Contributor III

We do what @ClarkPoole recommended. However, a few things to note:

-Unfortunately, they are still able to use iMessage through notification center if they have enabled it in System Preferences. -Yosemite seems to be much more aggressive about trying to launch the messages app on logon so I get numerous "block" messages upon logon.

I would have hoped that with Yosemite we would have seen a configuration profile option to disable similar to what is in iOS but at this point that hasn't happened.

I'm open to other ideas and suggestions that don't require actually deleting the app.

bpriscott
New Contributor

Have you tried?

Lock Messages:
sudo chmod 500 /Applications/Messages.app

Disable Notification Center:
sudo defaults write /System/Library/LaunchAgents/com.apple.notificationcenterui KeepAlive -bool false

This will disable it.. Just requires a client restart.

freddie_cox
Contributor III

@bpriscott I utilize Notification center to notify people of updates and changes being made to their machine so I chose to keep it around. However, it might be useful for someone else in a similar situation. So many apps are using it for their default notifications now so I try to keep my hands off of it.

Regarding the permissions, that was my initial direction. However, I had hoped there would be an Apple Approved method appear but at this rate it doesn't appear that is going to happen. Thanks for the tips!

ClarkPoole
New Contributor

@freddie.cox

Question for you. Have you ran into students "Renaming" the App? If so what have you done to work around this?

Is there a work around for it?

I'm going to call you some time this week.... Look forward to hearing from you!

freddie_cox
Contributor III

@ClarkPoole][/url we haven't had that issue, but that's because students don't have admin rights on the local machine so therefore they can't rename anything in /Applications.

I think your only work around would be permissions or removing the app. I'll look around some more and update if I see anything!

Looking forward to the call!

GSquared
New Contributor II

@ClarkPoole

If they have the rights to do so, most will only rename the .app which is really just a folder. The Software Restriction section looks for the actual binary being used iirc, which is named "Messages" in /Applications/Messages.app/Contents/MacOS/Messages

That would end up being /Path/To/Renamed/Messages.app/Contents/MacOS/Messages

This should still end up with the software being restricted. At least that was our experience with those we tested it with. We also had someone rename the binary and it did not run anymore after they did so.

Disclaimer: We did our testing using Terminal not Messages, but the same should apply.

freddie_cox
Contributor III

Just bringing this back up to the top to see if anyone has found a better solution to restricting Messages since January.

Looking at Moving to 10.10 for all our students in the fall and the block message is quite persistent in Yosemite which can be a bit of a distraction/annoyance when using it with the JSS's Restrictions.

bentoms
Release Candidate Programs Tester

@freddie.cox Persistent how?

Surely if messages.app is running & you've set it to block with a message it will do just that?

freddie_cox
Contributor III

@bentoms oh it blocks perfectly, but something keeps trying to relaunch messages in the background so they receive the block messages multiple times without any action being done on their part to initiate it.

Tried digging into it a bit more yesterday but can't track down the launchd task outside of com.apple.ichat(some random number)

bentoms
Release Candidate Programs Tester

@freddie.cox Ah. ok.. perhaps play around with the restrictions.. maybe ticking "restrict exact process name" etc..

freddie_cox
Contributor III

Thanks. The restrictions portion is working correctly sine we get the block message. Just have to find what keeps trying to initialize it.

bfrench
Contributor III

We are just prepping images in Yosemite and have seen the same issue. We have Messages restricted so a pop up appears, but something keeps prompting Messages to launch. Make it stop.

Clicking Delete Application in the Application restriction seems to have worked by removing the Messages application - just not sure what else my go awry as a result.......

bfrench
Contributor III

@freddie.cox
Once I removed the script we had set up to stop icloud prompts and diagnostics - Messages stopped trying to launch.

Looking for a new script for that now. Had tried the one from @rtrouton - will have to look into that a bit further.

freddie_cox
Contributor III

@bfrench Were you using Rich's script to remove the iCloud Prompts and Diagnostics listed here?

DerFlounder - Disabling iCloud and Diagnostics

Because I am also using that... Not where I can test that ATM but would be interested to hear more on how it goes for you.

jarradyuhas
Contributor

Have you tried moving the messages app to the admin desktop? We do that with our students and it seems to work fine since they can't launch it from the admin's desktop.

bfrench
Contributor III

@freddie.cox

Yes - we were using the script from @rtrouton. Removing the script from our image process has stopped the Messages app from launching at login. My only solution at this point is to keep the script but change my restriction on Messages from Restrict to Restrict and Delete the application - just not sure what else this may prompt going forward.....

Or skip the script completely and deal with the questions that will occur when the popups happen.....

bfrench
Contributor III

@freddie.cox
I came across another possible solution while trying to solve another issue. It seems that my original image was created on a machine using Core Storage. I converted my "image" machine back to HFS and made a new image with it. On machines I have run the new image on I am no longer seeing the issue of Messages trying to launch when I include the script to disable icloud and diagnostics in my configuration.

Barb

freddie_cox
Contributor III

@bfrench Finally getting around to trying this out and I am still getting the pop-ups when I leave the supress_setup script out of the mix. This is also present on a non Core Storage VM.

I'm also getting close to deleting the Messages app at this point, as much as I don't want to mess with it. Thank you for keeping this thread updated!

jreeves
New Contributor III

I'm also having similar issues with the messages app and students being able to reply from notification center.. I would even be fine with completely disabling notification center but even those commands above were not working for disabling it completely. I've tried everything i know how but it doesn't seem to stop them from receiving messages and replying via notifications.

morgrowe
New Contributor II

Have you tried disabling the service responsible for handling the functionality of Messages? I can confirm it disables the ability to use Messages.app properly and no Notification Centre alerts appear. But be aware, I don't know what other applications function under the assumption that this feature is enabled.

defaults write /System/Library/LaunchAgents/com.apple.imagent.plist Disabled -bool true
chmod 644 /System/Library/LaunchAgents/com.apple.imagent.plist

Restart the machine after running the commands.

You'll need to disable SIP (if using 10.11+) and have elevated privileges (sudo/root) in order to execute the above commands.

You can revert the changes by using these ones (don't forget to restart the machine afterwards):

defaults delete /System/Library/LaunchAgents/com.apple.imagent.plist Disabled
chmod 644 /System/Library/LaunchAgents/com.apple.imagent.plist

But beware, editing anything in /System/ is dangerous and Apple can revert any changes you make there, usually during OS X updates.

murph
New Contributor III

We finally had to start restricting the Messages.app yesterday for a handful of students too. Turns out it took them about five minutes to find how to use it in notification center, so we had to bring in their machines and sign them out of their accounts in Messages > Preferences. After restricting Messages again they are not able to use the notification widget as it tries to launch the Messages.app for them to sign into their accounts and it is obviously restricted.