(a) If a will of a domiciliary or nondomiciliary decedent is admitted to probate in accordance with this title, letters testamentary shall be granted by the Register of Wills of the county in which the decedent was domiciled, or in the case of a nondomiciliary in which the decedent owned real or personal property, to the executor or executors thereof, upon their giving bond in accordance with this title.
(b) If several are named as executors, and any are deceased, or fail to give the necessary bond, or renounce or are incapacitated, letters testamentary shall be granted to the others so named. If all of them, or a sole executor, is deceased, or fails to give the necessary bond, or renounces or is incapacitated, administration with the will annexed, shall be granted in accordance with this title.