We report a new design of resonant cavity for W-band EPR spectrometer. An improved coupling-adjusting mechanism, which is robust, compact, and suits with both solenoid-type and split-pair magnets, is utilized on the cavity, and thus enables both continuous-wave (CW) and pulsed EPR experiments. It is achieved by a tiny metal cylinder in the iris. The coupling coefficient can be varied from 0.2 to 17.9. Furthermore, two pistons at each end of the cavity allows for adjustment of the resonant frequency. A horizontal TE011 geometry also makes the cavity compatible with the two frequently-used types of magnets. The coupling-varying ability has been demonstrated by reflection coefficient (S11) measurement. CW and pulsed EPR experiments have been conducted. The performance data indicates a prospect of wide applications of the cavity in the fields of physics, chemistry and biology.