Castillo hit an RBI triple and an RBI groundout, Wright had two run-scoring hits and Francoeur hit an RBI single and a sacrifice fly.
Winner Livan Hernandez (7-5) gave up three runs and eight hits in seven innings with a walk and seven strikeouts.
Houston's Carlos Lee had three hits and one RBI, Geoff Blum had two hits and one RBI, Miguel Tejada drove in a run, while Blum and Hunter Pence had two hits apiece for the Astros, who have lost two in a row.
The losing pitcher was starter Brian Moehler (7-6). He went 4 2/3 innings, giving up five runs on eight hits with two walks and two strikeouts.