New key not registering


I have a 02 c240 I ordered a new key, towed my car to the dealership to get the new key. When they tried my new key they say that my battery was not keeping a charge and the key is not registering do that means I need a Eis. Also is a Eis able to be installed by any mechani other than dealership.