A simple route to 3-oxoalkanonitrile 5, aprecursor of the title compounds is described. Reaction of enaminones 2 with hydroxylamine hydrochloride in ethanol yielded aldoximes 3 that were converted readily into 5 in basic medium. This method has been successfully applied with a number of substrates and resulted in excellent yields of the products. Reacting 5 with trichloroacetonitrile afforded 3-amino-2-aroyl-4,4,4-trichloro-2-butenenitriles 6 that condensed with hydrazines to yield 3-amino-1H-pyrazole-4-carbonitrilederivatives 8. Substituted pyrazolo[1,5-a]pyridmidines have been prepared with regioselective condensation reactions of 8 with nonsymmetrical dielectrophiles. The structures of compounds obtained were deduced based on (1)H-NMR, (1)H-(15)N HMBC- measurements.