Posted on 10-28-2015 02:23 PM
I just built out an El Capitan 10.11.1 installer via createOSXinstallPkg along with @rtrouton's script "disable_apple_icloud_and_diagnostic_pop_ups_payload_free.sh" bundled via "First Boot Package Install Generator.app"
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!
Posted on 10-28-2015 07:18 PM
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?
Posted on 10-28-2015 07:24 PM
@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.
Posted on 10-28-2015 07:31 PM
but if the icloud prompt is pre first boot scripts, how then would one prevent this with a first boot script and no reboot?
Posted on 10-28-2015 07:39 PM
@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.
Posted on 10-29-2015 02:33 AM
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:
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:
https://derflounder.wordpress.com/2014/10/19/first-boot-package-install-generator-app/
Posted on 10-29-2015 04:30 AM
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.
Posted on 10-29-2015 06:17 AM
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.
#!/bin/sh
##
# 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" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.markIcloudComplete.plist</string>
<key>LaunchOnlyOnce</key>
<true/>
<key>RunAtLoad</key>
<true/>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/markIcloudComplete.sh</string>
</array>
</dict>
</plist>
" > /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.
IFS=$'\
'
osVer=`sw_vers -productVersion`
markerFile="/var/log/icloudDone$osVer"
if [ ! -e $markerFile ];
then
echo Disabling iCloud login wizard for OS X $osVer
for i in `ls -d /System/Library/User Template/*`;
do
defaults write "$i/Library/Preferences/com.apple.SetupAssistant.plist" LastSeenCloudProductVersion -string $osVer
defaults write "$i/Library/Preferences/com.apple.SetupAssistant.plist" DidSeeCloudSetup -bool true
defaults write "$i/Library/Preferences/com.apple.SetupAssistant.plist" DidSeeSyncSetup -bool true
defaults write "$i/Library/Preferences/com.apple.SetupAssistant.plist" DidSeeSyncSetup2 -bool true
done
a=`ls -d /Users/*`
for userfolder in $a
do
if [ "$userfolder" != "/Users/Shared" ];
then
defaults write "$userfolder/Library/Preferences/com.apple.SetupAssistant.plist" LastSeenCloudProductVersion -string $osVer
defaults write "$userfolder/Library/Preferences/com.apple.SetupAssistant.plist" DidSeeCloudSetup -bool true
defaults write "$userfolder/Library/Preferences/com.apple.SetupAssistant.plist" DidSeeSyncSetup -bool true
defaults write "$userfolder/Library/Preferences/com.apple.SetupAssistant.plist" DidSeeSyncSetup2 -bool true
chmod 666 "$userfolder/Library/Preferences/com.apple.SetupAssistant.plist"
fi
done
touch $markerFile
fi
" > /usr/local/bin/markIcloudComplete.sh
chmod +x /usr/local/bin/markIcloudComplete.sh
Posted on 11-02-2015 11:20 AM
@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 LoginLog.app 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.
Posted on 11-02-2015 01:23 PM
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 Generator.app
Choose "Installers" folder
Move the newly created first boot pkg to Desktop
run:
sudo createOSXinstallPkg --source /Applications/Install OS X El Capitan.app --pkg /Users/username/Desktop/First Boot Package Install.pkg --output /Users/username/Desktop/InstallOSX.pkg
Amazing Reference: https://derflounder.wordpress.com/2014/10/19/first-boot-package-install-generator-app/
Posted on 09-20-2017 08:43 AM
@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
markIcloudComplete.sh
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.