At the risk of offending those with much greater knowledge than I, I was told by another person that to do this, one way is to do it in your garage and to simply hook up a battery charger to the battery clamps before you undo them, making sure not to short out anything. Then just reconnect and remove the battery charger. Also, I was told just to make a little adapter out of a cigarette lighter plug and use a little nine volt battery. I was told this will maintain the voltage enough to retain radio presets, and your coding on the anti theft.
Hope this helps.