I think it's here:
pConf->SetPath ( _T ( "/Directories" ) );
wxString s =wxFileName::GetPathSeparator();
wxString def = *GetpSharedDataLocation() + _T("plugins")
+ s + _T("wmm_pi") + s + _T("data") + s;
pConf->Read ( _T ( "WMMDataLocation" ), &m_wmm_dir, def);
Since the config-file has its old value, WMMDataLocation=C:\\Program\\OpenCPN\\plugins, &m_wmm_dir will take that.
And if I delete the config file key:WMMDataLocation, pConf->Write will nicely print a new correct value.
But how to automate that for all users I'll ask a very clever Czech.
But five years is long time, right.