Want to highlight a helpful answer? Upvote!

Did someone help you, or did an answer or User Tip resolve your issue? Upvote by selecting the upvote arrow. Your feedback helps others! Learn more about when to upvote >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Problem with the message saying the app is open for the first time

Hi



I'm setting up MacBook Airs that will be used as public displays.

I need these Macs to shut down automatically at 20:00.

When I set my Mac to shut down at a specific time (via Energy Saver), macOS will countdown 60 secondes then will add an additional countdown of 10 minutes. The client does not want me, me either. We want the Macs to shut down immediately.



There is a solution:

This AppleScript line

tell application "System Events"

shut down

end tell

does what I need as it shuts down the Mac straight away.

Even if I include this instruction in Automator it works.

If I save the instruction as a standalone AppleScript or standalone app, and if I double-click that app, it works.


The problem is that it is a public display and the Mac is supposed to shut down automatically.


When I create a Calendar Alarm via Automator, a message pops up and says: "This is the first time you open this app. Are you sure you want to open it" but if I open it manually, no problem.


There are various method to disable that warning:

  • right-click > Open the app at least one time, so it is added in a registry of authorized apps.
  • run this command line sudo spctl --master-disable in Terminal so in High Sierra the "Anywhere" option appears and authorizes all apps to be open.
  • in Automator, create a Calendar Alarm, use the "Run the AppleScript" option, add the code, save the file, it is added in the Calendar and the Mac shuts down immediately.


I turn on the Mac and edit the time of the Calendar Event so it happens again 2 minutes later.

Problem: the message "This is the first time you open this app. Are you sure you want to open it" appears.

So I select the file created by Automator and that is triggered by Calendar, right-click > Open: the Mac shuts down.


I turn on the Mac again and edit the time of the Calendar Event so it happens again 2 minutes later.

Problem: the message "This is the first time you open this app. Are you sure you want to open it" appears.


I have restarted in Safe Mode to delete the caches and it does not help.


Each time I launch this app manually, it works and the Mac turns off straight away without warnings.

If another method triggers it automatically, the message appears.


The crazy thing is that on the first Mac I set up, it works perfectly, but not on Mac #2.


Do you have a solution?

Can I add manually this app in a registry of authorized apps?


Thank you

Posted on Feb 27, 2018 11:30 AM

Reply

Similar questions

6 replies

Problem with the message saying the app is open for the first time

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.