Click or drag to resize
ModulesModuleResetUninstallationTokensOfInstallableModules Method

Cleans out uninstallation tokens for all modules, including associated data (i.e. module uninstallation files). This allows for module re-installation when the database has been lost, but the modules are still present in code base (e.g. after dropping the database and installing a new one using the wizard).

This method must be called after application pre-initialization phase has finished (to reflect changes in custom path mapping). When called after the instance has already been initialized (and module installation processed), the module re-installation will occur upon next startup.

Namespace: CMS.Modules
Assembly: CMS.Modules (in CMS.Modules.dll) Version: 10.0.0
Syntax
C#
public static void ResetUninstallationTokensOfInstallableModules()
Remarks

Reset of module uninstallation tokens allows for re-installation of modules which had already been processed by this instance, but have not been uninstalled (i.e. have not been removed from the code base). It is designed for situations when you want need to install all modules again (e.g. after database has been recreated to its initial state). If you need to allow for re-installation of some particular module, you should simply uninstall it (i.e. remove from code base) and then install again.

If you reset uninstallation tokens when modules are installed (i.e. they are present in the database and code base), you prevent them from being uninstalled by this instance. However, the instance will recover the missing tokens (and associated data) for installed modules upon its next startup.

See Also