I've been trying to find a way to install macOS High Sierra using terminal to install it on various computers quickly. It can be done with macOS Sierra and OS X El Capitan after mounting the InstallESD.dmg file in the directory Install macOS Sierra.app/Contents/SharedSupport using the following code in terminal:
installer -allowUntrusted -pkg Volumes/OS\ X\ Install\ ESD/Packages/OSInstall.mpkg -target Volumes/Macintosh\ HD
I've tried using the same methods to install High Sierra, but it always gives the following error:
The OS Install failed with error: Error Domain=NSPOSIXErrorDomain Code=0 "Undefined error:0
There aren't many articles online for finding a solution to this issue, but there are many about creating a bootable drive. Thank you in advance for the answers.