Best way to get 12 V from 28 V or 5 V ?

Thanks for the info guys. Three more questions:

1 - The solenoid will have a duty cycle of 17% (on for 1 S, off for 5 S, repeat) so I think the LM7812 will be dissipating 400 mW instead of 2.4W correct?

2 - Do I wire the LM7812 up with just a .33uF cap on the input and a .1uF cap on the output, like in the "Typical Applications - DC Parameters" section of the spec sheet?

3 - Crossroads you said to use this chip because a resistor voltage divider's voltage out will vary with the current being drawn. Is that really important for a solenoid? My (limited) experience with electromechanical things is that they're pretty tolerant of voltage ranges. (I'm going to use your advice and use the LM7812, I'm just trying to figure out what's appropriate when).

Thanks again,

Chris