In this paper, a new methodology is developed for the closed-form solution of a generalized version of the finite-horizon linear-quadratic regulator problem for LTI discrete-time systems. The problem considered herein encompasses the classical version of the LQ problem with assigned initial state and weighted terminal state, as well as the so-called fixed-end point version, in which both the initial and the terminal states are sharply assigned. The present approach is based on a parametrization of all the solutions of the extended symplectic system. In this way, closed-form expressions for the optimal state trajectory and control law may be determined in terms of the boundary conditions. By taking advantage of standard software routines for the solution of the algebraic Riccati and Stein equations, our results lead to a simple and computationally attractive approach for the solution of the considered optimal control problem without the need of iterating the Riccati difference equation