ZnS material shows great application prospects in fields such as infrared windows, fairings, and lenses. In this study, a crack template method was developed to prepare gold meshes with random structures on ZnS optical window. The crack template and gold meshes structures were designed from a completely new perspective focusing on the period and line width ratio. Then, four different structural parameters of the gold mesh were fabricated using the crack template method, their ratios of the aperture to line width were 16.1, 17.4, 18.0, and 19.0. The templates’ morphology and structural traits were examined via optical and laser confocal microscopy. The sample with a ratio of aperture to line width of 16.0 had the best connectivity and the highest coverage, at 15.33%, while the sample with a ratio of aperture to line width of 19.0 had the lowest coverage, at 11.64%. Gold meshes were deposited using these templates, where an increase in the aperture-to-line width ratio resulted in average transmittances of 57.1% and 63.2% over the 2–10 μm range. The electromagnetic shielding efficiency surpassed 22.5 dB within the 1–18 GHz range, while the 1#-mesh, with an aperture-to-line width ratio of 16.0, achieved 33.2 dB at 1 GHz. This research endeavor contributes significantly to advancing the understanding of the ZnS glass’ optoelectric performance and enhances their potential for practical applications.