Does anyone have any good ideas on how to stop a Mac OS installer (Mojave) from deleting itself after it is done running. With all of the wonderful new 'erase and install' commands available now with APFS it is really nice to have the installer available when you need it.
Meanwhile, I have been having an issue with our upgrade in place policy. Occasionally it errors out, and the installer will delete itself after having tried to run. We then need to copy the whole 6+gb over again. It gets a bit tedious and unnecessary after a while.
I'd like to figure out a way to stop it from auto-removing itself once it has been run, but still leave have the ability to manually remove it when we are ready. I'm assuming there is something buried within the installer that could be removed, but haven't been able to find anything yet.
Anyone? Pretty please?
I read an discussion around here somewhere that has instructions on how to "stage" the update. Basically one policy command copies the installer from your JSS then after that's been verified successful it runs the installer in another policy a day or so later. Its a multi-step approach so you're not trying to download and install in one go.
I found that the macOS Installer only self deletes when its run from the default /Applications download location
If you move it to something like /Users/Shared/ then it remains there after installation has been completed
Obviously this won't work for erase & install workflows, but it does for in place upgrades if your using the standard installer app
@garybidwell is correct.
for my environment, I have a hidden directory on end user machines that I stage important installers on, one being the macOS Mojave installer. By placing it in any directory besides /Applications the installer will not delete itself.
part of my provisioning sequence places the latest macos installer in the directory so during re provisioning and running the erase install flag configured for my environment creates a seemless - no nonsense - easy life for the deployment team
I believe the path to what causes the file to eat itself is located here
PATH TO INSTALLER
Install macOS Mojave.app/Contents/Frameworks/OSInstallerSetup.framework/Versions/A/Resources/cleanup_installer
this then kicks off a plist com.apple.installer.cleanupinstaller.plist
i cant seem to find the contents of this plist & not worried enough to reboot & disable sip to get passed the locked file location! but if you REALLY NEED IT in the /applications directory... you can always try to mess with that... but again "I BELIEVE" this is where the settings are stored that remove the installer upon completion.