When I install crown molding, I like to rip down a 2X4 into two 1 1/2" by 1 1/2" triangle shaped pieces (nailers) that I put up under where the crown molding will go, attaching it with long 3" drywall screws into the top plate of the wall, predrilling the holes in the nailer first. This holds it very securely. I then cut and fit the crown molding, getting it right where I want it, then nail into the middle of the molding into the nailer behind it. This helps to draw the molding up tight against the wall/ceiling, and I don't have to worry about nailing only where there are studs.
For chair rail, I predrill the holes through the molding and the plaster (use a finish nail as a drill so you don't dull your good drills in the plaster) , but not into the studs. I then nail through this pilot hole with #8 casing nails the old fashioned way: with a hammer... and try my darndest not to miss (smile)