To neutralize arty/missile batteries, you need to know exactly where they are located. You need locating devices and radars for tracking and computer systems for calculating the trajectories of the projectiles that include terrain config, wind velocity, ambient temperature, altitude and so on to arrive at the launch locations. Counter battery systems are altogether a different ball game. But yes, once identified, then various means can be employed to neutralize these gun positions. However, remember the 'shoot and scoot' capabilities of most missile systems/guns making it harder still to pinpoint their locations within an acceptable time frame.
Cheers!