In this paper, we consider a classical risk model with dividend payments and capital injections in the presence of both fixed and proportionals administration costs. Negative surplus or ruin is not allowed. We measure the value of a strategy by the discounted value of the dividends minus the costs. It turns out, capital injections are only made if the claim process falls below zero. Further, at the time of an injection the company may not only inject the deficit, but inject additional capital C ≥ 0 to prevent future capital injections. We derive the associated Hamilton–Jacobi–Bellman equation and show that the optimal strategy is of band type. By using Gerber–Shiu functions, we derive a method to determine numerically the solution to the integro-differential equation and the unknown value C.