you do have the eeprom.bin of your xbox now do you? if you've got the wits for trying to create an autoinstaller but didn't get your eeprom.bin before testing it you're not ready for even attempting to create something like that
in which case a hotswap is indeed your only way out
however, if you do have your eeprom.bin, xboxhdm can unlock your drive, rebuild it and relock it in a pretty straightforward way...
just posted this as a possible option to avoid the risky hotswapping