As soon as that happens I stop and I analyze the problem, if I can automate it completely I'll do it, if I can only automate a part of it I'll do that and then try to find a way to either get rid of the remainder completely, offload it to my users in some guise or other and failing that I'll pay someone some money to do it for me.
Concrete examples are for instance the system administration tasks involved in keeping 20 servers up and running without additional staff, scanning email in my inbox for recurring questions (people not reading the FAQ), which get handled by an auto-responder pointing them to the relevant page with a friendly, personalized letter and so on.
Support is inevitable, I put myself forward to handle the 'problem' cases because those tend to drive development, but if I can get away from boring work I'll do it.
Someone joked that I'd rather spend a day at automating something that costs maybe 5 minutes to do by hand, and in a way that's very true but it's gotten to a point now where I can run a huge website pretty much by myself with occasional help from a few users with 'elevated' status.
I think the hard part is to decide that it's better to spend several hours automating a 5 minutes manual task.
I'm often faced with repetitive tasks and I realize that it's wrong to do them, but it's not easy to say : "Ok, let's put my important work aside and automate this."
Real progress is still being made, but it is much less visible later in a project than in the beginning.
So those of us that are motivated by being able to measure their progress on a day-by-day basis have a hard time to stay motivated later on in a projects life-cycle.
Good one!
The motivating factor for me is more in the 'change the world' idea, and I think that learning is definitely a key motivator for me. If I'm not learning, and I'm just "executing" what I've learned, I get stuck.
Can you give an example of how you've made things (preferably software!) maintenance-free?