A generalized version of the Maximum Work Theorem is valid when the system is initially not at thermal equilibrium. In this work, we initially study the fraction of trajectories that violate this generalized theorem for a two simple systems: a particle in a harmonic trap (i) whose centre is dragged with some protocol, and (ii) whose stiffness constant changes as a function of time. We also find the optimal protocol that minimizes the average change in total entropy. To our surprise, we find that optimization of protocol does not necessarily entail maximum violation fraction.