The process you want to attempt will not work this way. If at any time, the system is rebooted prior to OOBE being presented, the OS installation will fail and become unusable.
However, Windows does actually do a reboot itself before presenting the OOBE pages. You can try running your command in the Specialize pass. I'm not certain if the specialize pass occurs during the first phase of installation or not.