I just got back from being out of the country for 6 weeks during which my '00 540iA was garaged and not started.
The manual suggested that I disconnect the battery if the car is not used for a month or more. Not wanting to worry about what would need reseting when I reconnected the battery, I followed Jim Cash's advice to connect a battery charger and ran the charger once each week for 30 minutes off a timer.
I had no problems upon return. The car started as easily as before and all settings were still intact.