The effect of vibrational excitation, for example by infrared (IR) laser pulses, on the photodesorption of H-2 and D-2 from a Ru(000 1) surface has been investigated theoretically. Based on information from first principle electronic structure theory, a minimal two-mode and two-state model is developed for Desorption Induced by Electronic Transitions (DIET) in the single-excitation limit. In the model, the finite excited state lifetime of a few femtoseconds fs) is accounted for by a lifetime averaging scheme. Using the vibrational ground state as initial state for averaging, the energy partitioning into different degrees of freedom and isotope effects are investigated. We then consider vibrationally excited states and vibrational wavepackets as initial states, which are found to have a large influence on the outcome of the reaction. To show that IR excitation of the adsorbates is feasible, we use optimal control theory to design pulses in the sub-picosecond range. For these, vibrational relaxation in the ground state due to coupling of adsorbate vibrations to electron-hole pairs of the metal is accounted for. Our major result is that isotope- and bond-selective control of photoreactions should be possible to some extent, even in strongly dissipative media. (c) 2007 Elsevier B.V. All rights reserved.