We analyze the impact of both an incoherent and a coherent continuous excitation on our proposal to generate a two-photon state from a quantum dot in a microcavity [New J. Phys. 13, 113014 (2011)]. A comparison between exact numerical results and analytical formulas provides the conditions to efficiently generate indistinguishable and simultaneous pairs of photons under both types of excitation.