Somin's not right. I got my car with two factory dead keys. Got a new key from the dealer, been working great since. 50'+ range. I drive it 40 min/day and do a lot of 10-15hr trips. Usually about 2 or 3 per month. Key is perfect. I'd say you probably need a new key. That's the most common failure, the battery inside dies off. Dealer even told me if you get more than 5yrs from a key you are lucky.
DD: 2003 530i 5spd manual sport package. Conti DWS's, Llumar ATR, White LED lighting. TLC on-going.
Garage queen: '07 335i Sedan, base pkg, 6spd Manual, Procede 3 V5 w/NLS, staggered 18" 313's w/Conti DWS's, OS Giken TCD LSD, VAC Street Diff Cover, Akebono Euro Pads, CDV Removed, Black BMW Grilles, Interior & Exterior white LED lighting, LUX Angel Eyes, Debadged, Llumar ATR Tint.