Task-specific ionic liquid, 1-n-butyl-3-methylimidazolium cyanide ([bmim]CN), in the presence of [bmim]Br has been prepared and used for the first time as the medium as well as reagent for the synthesis of aromatic cyanodienones from the corresponding triarylpyrylium perchlorates by cyanide-halide exchange. The [bmim]CN having a reactive anion, also could promote the desired reaction thereby reducing the reaction times and improving the yields substantially. The products could be easily isolated from the reaction mixture by simple extraction.