Suppress iCloud and Diagnostic Prompts on El Capitan Upgrade

Contributor III
Contributor III

I just built out an El Capitan 10.11.1 installer via createOSXinstallPkg along with @rtrouton's script "" bundled via "First Boot Package Install"

The goal was to create an El Cap installer that will not show the iCloud login and diagnostic data collection prompts after successful install. That goal was only partially achieved but there's an inconvenient event that occurs after installation that I am unsure how to prevent.

When the OS X install completes, it goes immediately to the iCloud login prompt but then the screen goes black for about 5 seconds and the computer reboots. When the computer reboots the install is complete and the end-user had no interaction with the two prompts...which is why I say it was partially achieved.

Is there any way to accomplish this without a reboot?

Also, it's important for me to note that this installer will not just be used as a Self Service installation option so policy-based solutions to this reboot problem will not work for running this on non-managed computers.

Thank you!


Valued Contributor

Sounds like expected behaviour no?

Machine installs OSX, icloud pop comes up, script to disable icloud runs, machine reboots, no icloud pop up

Whats the issue with the reboot?

Contributor III
Contributor III

@calumhunter Well, to be honest, I'm not sure if the reboot is to be expected. The createosxinstallpkg created el cap installer without any post-install stuff doesn't reboot when you proceed through the iCloud and diagnostic prompts. I was hoping to get rid of the two steps at the end of the install and have it just go to the login screen as if those steps were completed - no reboot.

Valued Contributor

but if the icloud prompt is pre first boot scripts, how then would one prevent this with a first boot script and no reboot?

Contributor III
Contributor III

@calumhunter You're absolutely right. I suppose I was hoping to accomplish something that may not be achievable then since the screens I want to supress are loaded from the installer finishing up and not the first boot. Are those prompts baked into the El Cap installer then? Is there no way to prevent them from displaying other than allowing the reboot?

Really, the reboot isn't a big deal but at this point I'm more curious than anything as to whether or not avoiding the reboot is possible.

Release Candidate Programs Tester

The firstboot package generated by my tool will reboot the machine, once the included packages have finished being installed. The sequence of events should look like this:

  1. OS upgrade completes
  2. Firstboot package script begins its run:

A. If the option to run software updates had been selected, available updates are checked for and installed, with the Mac rebooting as needed until all available updates are installed.

B. All included packages in the firstboot package are installed.

C. Once all included packages are installed, the Mac reboots.

D. After the reboot, the firstboot package script cleans up by removing all firstboot package components, along with the script itself.

For more information about this, please see the link below:

Contributor III
Contributor III

Thanks @rtrouton for clarifying that and letting me know that is expected behavior even without checking for updates. I knew about the reboot for software updates but I chose not to check for available updates so I was expecting no reboot after the first boot package ran.

So at this point there is no way to remove those prompts at the end of the installation without a reboot.

Contributor III

I run the following script on all my systems. This causes the proper default write conditions to be configured on boot every time the OS version changes.

#   Writing out launchd item to disable the iCloud login wizard every time the os version is increased/patched. 

echo "
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "">
<plist version="1.0">
" > /Library/LaunchDaemons/com.markIcloudComplete.plist
chmod 644 /Library/LaunchDaemons/com.markIcloudComplete.plist

echo "
# Disabling icloud preferences wizard on logins for current os revision.

# Setting this variable, "field splitting" makes sure each line is considered as such, even with spaces in them.  
#  Otherwise spaces are considered splitters.  Here we are specifying "
"(page break) is the only splitter.  

osVer=`sw_vers -productVersion`


if [ ! -e $markerFile ];
    echo Disabling iCloud login wizard for OS X $osVer
    for i in `ls -d /System/Library/User Template/*`; 

        defaults write "$i/Library/Preferences/" LastSeenCloudProductVersion -string $osVer
        defaults write "$i/Library/Preferences/" DidSeeCloudSetup -bool true
        defaults write "$i/Library/Preferences/" DidSeeSyncSetup -bool true
        defaults write "$i/Library/Preferences/" DidSeeSyncSetup2 -bool true

    a=`ls -d /Users/*`
    for userfolder in $a
        if [ "$userfolder" != "/Users/Shared" ];
            defaults write "$userfolder/Library/Preferences/" LastSeenCloudProductVersion -string $osVer
            defaults write "$userfolder/Library/Preferences/" DidSeeCloudSetup -bool true
            defaults write "$userfolder/Library/Preferences/" DidSeeSyncSetup -bool true
            defaults write "$userfolder/Library/Preferences/" DidSeeSyncSetup2 -bool true
            chmod 666 "$userfolder/Library/Preferences/"
    touch $markerFile
" > /usr/local/bin/
chmod +x /usr/local/bin/

Contributor III
Contributor III

@rtrouton Can you explain this behavior to me? When I run the OS X installer locally (not initiated by Casper) with the first boot script as described in my opening post everything works great. When I run the installer via Casper Self Service OS Install - Upgrade via your outlined method to cache and install it, the script appears to have no affect and on first login after successful upgrade the user is immediate hit with the iCloud sign in prompt.

Does something need to be modified for use with Self Service? After the installer completes I see the launch, no errors listed, reboot, and log into a user account only to see the iCloud prompt.

Edit: firstbootpackageinstall log shows "Found 0 packages to install" so I've clearly mixed something up. I'm going to start from scratch and rebuild it all hopefully resolving this current problem.

Contributor III
Contributor III

Re-creating the OS X Installer has resolved my most recent issue. I must have moved over a previously created installer than the one I had confirmed working properly. Sorry for the confusion and thank you for the incredible resources that made this possible.

My workflow was in this order:
Create "Installers" folder on the Desktop
Create "00" sub-folder
Place payload free pkg in "00" (Disable Apple iCloud and Diagnostic Pop-Ups.pkg)
Open First Boot Package Install
Choose "Installers" folder
Move the newly created first boot pkg to Desktop

sudo createOSXinstallPkg --source /Applications/Install OS X El --pkg /Users/username/Desktop/First Boot Package Install.pkg --output /Users/username/Desktop/InstallOSX.pkg

Amazing Reference:

New Contributor II

@MrP Does your script still work to this day and current OS X versions? Also where would I get the following files: com.markIcloudComplete.plist

I do not see either one in these locations on my Macbooks. I have been trying to find a way to prevent the iCloud Prompt pop-up for some time. I do IT work for a School Division and don't need students logging into their Apple accounts. Just easier if the prompt is not there when they first log in. Thanks for your time.