Pay off the credit cards. If you are carrying balances on those cards of more than 30% of your limit, that hurts your score. Paying off the balances will give your score a boost. Paying off the cards will also improve your debt to income ratio, an important factor in the mortgage approval process.
Paying off the installment loans will not improve your score. In fact, it would probably drop your score. Installment loans build credit by making the payments over time. Paying them off early does nothing to improve your score. The loans would be closed/paid and not count as much in your score as open, active accounts.
Of course, paying off the installment loans would also improve your debt to income ratio. But you'll get more bang for your buck paying off the credit cards. Besides, the cards probably have a higher interest rate.
You absolutely do not want to open or close any lines of credit within 6 months of applying for a mortgage.