er.. do you have the locking password related to your friends xbox's eeprom? what process did you go through to lock the hard drives before putting them in your friends box? You do realize that you cannot just hotswap the drive into your xbox and lock it with configmagic, and put it back in your friends right? It locks with a specific password that your eeprom on your motherboard has the code to unlock. That code varies from xbox to xbox. If you already had the password to your friends xbox, then no hotswapping was required in the first place, and you can just restore the C drive files and relock it with the password.
If you don't have the password, you can only hotswap with the original drive. I'll explain briefly..
The hard drive is currently in a state of being locked, which leaves it inaccessable until unlocked, and locking is enabled, which means once you cut the power off to the hard drive, it automatically locks itself up.
If you do not have the drives password, what you are trying to do is have the xbox unlock the drive because the password is stored in the eeprom, and after it has been unlocked, basically ripping out the IDE cable and replacing it with the computers. You can not shut down power to the hard drive even for a second because it will lock itself back up.
After you've hotswapped the IDE cable to the computers, you can restore the system files, and simply turn the computer off after your done. You can do this because the xbox unlocked the drive, but did not disable locking, so it still automatically locked itself to the same password once you turned off your computer.
From here you can just put it back in and the xbox can read it again.
((sorry if you already knew alot of this, but I thought I'd make sure you understood the theory behind the hotswap))