Feature is installed in the 12\template\features directory, and each feature is a subfolder. At the root of its folder, there is a feature.xml file that defines the contents of the Feature.
Note When you create a folder in the feature directory through Windows Explorer (right-click a folder, click New, and then point to a folder), the newly created folder does not inherit permissions. If you deploy a feature to this folder, an exception will occur in some WSS pages, such as Site settings or list views. You can correct the problem by right-clicking the new folder, clicking the attribute, clicking Secure, then clicking Advanced, and deleting the folder without inherited permissions in the Permissions tab. Or you can create a new folder by using the MD command in command line mode.
You must install it before using a specific feature. To install a feature, you can use the following command:
Stsadm–o installfeature–filename <feature.xml files relative to 12\template\features folder path >
When you install WSS v3 and MOSS 2007, all default feature are installed automatically.
In addition to installing feature, you must also activate it before you use it (unless the feature is field scoped and is automatically activated in this case).
To activate a feature you can use the following command:
stsadm –o activatefeature –name < 在FEATURES 目录中包含 Feature.xml 文件的文件夹 > -url http://Server/Site/Subsite
You can uninstall a feature by using the uninstall operation of the Stsadm command-line tool. After uninstalling, the feature definition is no longer available in the server farm.
Attention:
You need to close the feature (except for Web application or farm-scoped feature) before uninstalling. Shutdown can be done on the Web interface or through command-line operations, and uninstall can only be done through the command line.
After uninstalling the feature, restart IIS for the change to take effect.
You can use the deactivate operation of the Stsadm command-line tool to close a feature. When closed, the feature will become inactive within its original scope.
The order is as follows:
stsadm.exe -o deactivatefeature
{-filename <Feature.xml 文件相对于 12\TEMPLATE\FEATURES 文件夹的路径 > |
-name <在FEATURES 目录中包含 Feature.xml 文件的文件夹> |
-id <feature Id>}
[-url <url>]
[-force]
The command for the uninstall operation is:
stsadm.exe -o uninstallfeature
{-filename <Feature.xml 文件相对于 12\TEMPLATE\FEATURES 文件夹的路径> |
-name <在FEATURES 目录中包含 Feature.xml 文件的文件夹> |
-id <feature Id>}
[-force]
You can then delete the corresponding folder under features.