Why would anyone start to fiddle with the FMS in such a situation? The PF will need to keep the aircraft in a glide towards the most suitable place for a landing and the PNFs attention would be best directed to possibly restoring some engine power and reading the appropriate abnormal lists. Also the cabin needs to be prepared, a mayday call to ATC would be in order as well. The exact course of action will of course depend on position and altitude, weather conditions and many other factors, but FMS programming would be at the very end of the priority list.
ATC might offer advisory directions towards a field with CAVOK conditions, but apart from this, what I would want them to do if I was in such a situation would be to keep track of the aircraft with the aim of getting rescue teams there as quickly as possible.