Your windows were working fine, smoothly traveling up and down with the push of the button, happily letting in the nice outside air, until one day out of nowhere one or both of the windows now only move in small increments. Decision time: Do it yourself or spend your next paycheck at the repair shop.
Please note that this repair applies only to the problem of the window movement in 1 inch increments. If your windows have stopped working altogether, stop reading this, then check your fuses, the comfort relay, window switches, wiring, etc.
This is a relatively easy do-it-yourself repair, it should only take a few determined hours on a nice sunny day to complete. By doing it yourself you'll save anywhere from under $100 for a used motor to over $500 for a shop to install a new motor. Cost of this DIY project: approximately $4.
The first step is to carefully remove your door panels, making sure your windows are all the way up before starting the job. Start with the two screws behind the handle, then gently pry off the panel clips with a plastic trim remover tool. If you don't have one try a plastic fork. Take your time and be careful not to just yank off the panels. The pressboard material tears easily, and the less you damage it now will save you precious time later in not having to repair it. Once the panel is off, carefully remove any wiring to the speakers and power mirror controls. Set the panel off to the side in a safe place.
Next carefully remove the front cover from the window motor, the larger black one facing you. Now look for the magnet. If you don't see it in the opening as seen in the picture below, then it has moved down the motor shaft and out of the range of the sensor. If you're lucky you can gently ease it back into place with a small screwdriver. Otherwise you'll have to take off the silver motor cover and push the magnet back into view. There is no need to completely remove the silver cover. If you do, make sure you put it back on exactly how it was assembled or the polarity will be reversed, meaning the 'up' side of the switch will make the window go down, and visa versa. Now that you've found the magnet, its time to reposition it. Usually you can see where the magnet originally sat from the clearer marks on the shaft. However as long as its in the little rectangular window it should work. If you're unsure, situate the magnet, partially assemble the covers back on and give it a try. My driver window seemed to like the magnet just a little to the right more than the passenger side. As a rule of thumb it's best to make your bimmer happy and adjust accordingly.
Since you have now become an expert at the magnet job, now would be a good time to repeat all these steps on the other side of the car. The logic is if one went bad, the other may be closer than you think. When I first tackled this repair on the driver side door, I didn't worry about the passenger side because it was working fine. However a week later both windows were now only moving in increments. Figuring the epoxy did not hold and the magnet had moved, I tore apart the driver door again only to see everything looked as it should be. After wasting time checking fuses and relays, the light bulb of common sense lit up and I checked the passenger door to find its magnet had moved out of sight. Not sure why the passenger door made both windows not work correctly, but that's another unique challenge of BMW electronics. After fixing the passenger door, both sides again worked fine.
Since you have the glue handy, it is a good time to make any repairs to the door panel before the epoxy inside the tube starts to set up. However if you tore out any of the plastic trim clips, do not simply glue them to the door panel as they need a little bit of free play to reattach to the door. Depending on how bad you or the previous mechanic tore the press-board its time to be creative. For example epoxy a metal washer to the torn area to remake a solid ground for the clip. Or you can epoxy a square of outdoor-grade plastic Velcro to the panel and glue a corresponding piece of Velcro to the door itself. I tried both options with a successful hold.
As you wait the next 24 hours for everything to dry and cure, take the opportunity to feel sporty and drive your bimmer in race-car mode for the next day with the windows closed and the door panels safely tucked away under your bed. When enough time has passed re-assemble in the reverse steps as dis-assembly and be proud of a job well done. Before using the power windows for the first time, follow these steps. With the doors closed and the windows (hopefully still all the way up) turn on the ignition, then press and hold the up button on the switch, and count to ten. This will reset the motor and the memory. Try the switch, operating the windows up and down. They should work smoothly and stop at the correct location. If not repeat the reset step again.
Now go out for a drive and show off your newly repaired power windows. Drive through a couple different fast food places just so you can smile when getting your lunch, or go on the highway so you can feel happy paying the toll fee because your windows now work nicely. If you're really adventurous you can stretch out the wait time on reattaching the door panels and continue to drive in race-car mode for another few days and pretend you're in a rally car race while you're on the way to your boring job in the real world. Either way your windows should be working fine now and you're ready for another project.