Ian,
If you want to do this without the use of a microcontroller, then I think that you will need to use a mechanical cam to activate the switch.
You could do this by cutting a tapered cam profile in a long piece of plastic or wood that is mounted to the drawer. The cam would need to be hinged in such a way to allow the cam follower (attached to a micro switch) to activate the switch when the drawer is being closed . . . yet take a slightly different path (bypassing the cam) when the drawer is being opened.
Some ball point pens that operate by pushing the button once to extend and pushing it a second time to retract, work on a similar principle.