All perfect praise be to Allah the Lord of the Worlds. May His peace and blessings be upon Prophet Mohammad and upon all his family and companions.
Islam has forbidden Khamr (Alcoholic beverages, wine; liquor) as well as every other intoxicant. Allah the Almighty says {What means}: " O ye who believe! Intoxicants and gambling, (dedication of) stones, and (divination by) arrows, are an abomination,- of Satan’s handwork: eschew such (abomination), that ye may prosper." {Al-Mai`dah, 90}. Ibn 'Umar reported God's Messenger as saying, "God has cursed wine, its drinker, its server, its seller, its buyer, its presser, the one for whom it is pressed, the one who conveys it and the one to whom it is conveyed." {Related by Abu Dawud}. Ibn 'Umar (RAA) narrated that the Messenger of Allah (PBUH) said: "Every intoxicant is Khamr, and every intoxicant is prohibited." {Related by Muslim}.
Consequently, it isn`t permissible to spray alcohol on cake even if it evaporates immediately and leaves no taste afterwards. This is because it renders the cake impure. Al-Shirbini (May Allah have mercy on him) said: "It isn`t permissible to use Khamr in baking bread because the Khumr is consumed in the fire but the bread remains impure. It is also impermissible to use Khamr in any other food." {Moghni Al-Mohtaaj, V.4:188}.
We advise bakers to avoid using alcohol in any of their products and to use other lawful materials so as not to incur the wrath of Allah the Almighty. And Allah the Almighty knows best.