/// <summary> /// Deletes all addons, addon loader, and configuration data related to addons. /// </summary> public void DeleteAllAddons() { //set installed, disabled, default, and version collections to the default installation setting _configurationManager.UserConfig.AddonsList = new AddonsList(); //clear loader_version _configurationManager.UserConfig.LoaderVersion = null; //delete disabled plugins folder: ${install dir}/disabled plugins if (_fileSystemManager.DirectoryExists("Disabled Plugins")) { _fileSystemManager.DirectoryDelete("Disabled Plugins", true); } //delete addons: {game folder}/addons if (_fileSystemManager.DirectoryExists( _fileSystemManager.PathCombine(_configurationManager.UserConfig.GamePath, "addons"))) { _fileSystemManager.DirectoryDelete( _fileSystemManager.PathCombine(_configurationManager.UserConfig.GamePath, "addons"), true); } //delete addon loader: {game folder}/{bin/64}/d3d9.dll _fileSystemManager.FileDelete(_fileSystemManager.PathCombine( _fileSystemManager.PathCombine(_configurationManager.UserConfig.GamePath, _configurationManager.UserConfig.BinFolder), "d3d9.dll")); //write cleaned config file _configurationManager.SaveConfiguration(); }