Change the settings in Medieval II Total War first, and then run cfgfixer.bat in the Medieval II Total War folder.