In this paper the KKT system of a general variational inequality problem (denoted by VIP(X,F)) is reformulated as a constrained optimization problem. A sufficient condition, which ensures a stationary point of the optimization problem being a solution of the KKT system of VIP(X,F), is analyzed. A projection-type method for solving the KKT system of VIP(X,F) with closed convex set $X$ is presented. The new algorithm has nice properties such as retaining feasibility, easy computation if the region $X$ is a box or a ball, and strongly global and local convergence. Numerical
examples show that the new algorithm is promising.