Following are the steps to remove this button from Ribbon
In Visual Studio 2010:
Without Visual Studio: With SharePoint 2010 Management Shell (PowerShell)
In Visual Studio 2010:
- Create an empty SharePoint 2010 Solution , you may give your favorite name to it
- Add a feature by right clicking on the Features in Solution Explorer
- Right click on the Project and add a new item, choose empty element and name it
- Open the Elements.xml file from the newly added item
- Copy & paste the following XML into the Elements.xml file
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<CustomAction
Id="RemoveRibbonButton"
Location="CommandUI.Ribbon">
<CommandUIExtension>
<CommandUIDefinitions>
<CommandUIDefinition
Location="Ribbon.Library.Actions.OpenWithExplorer" />
</CommandUIDefinitions>
</CommandUIExtension>
</CustomAction>
</Elements>
Deploy the Solution and observe that “Open with Explorer” button will be removed from the Ribbon.
Without Visual Studio: With SharePoint 2010 Management Shell (PowerShell)
- Create a folder under %Program Files%\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\FEATURES\RemoveRibbonButton
- Create a feature.xml file in RemoveRibbonButton.
<?xml version="1.0" encoding="utf-8" ?>
<Feature Id="MyFeatureId"
Title="Remove button feature"
Description="Description of the Feature."
Version="1.0.0.0"
Scope="Web"
xmlns="http://schemas.microsoft.com/sharepoint/">
<ElementManifests>
<ElementManifest Location="manifest.xml" />
</ElementManifests>
</Feature>
- Create a blank xml file - manifest.xml in RemoveRibbonButton folder and add the below content to it and Save it.
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<CustomAction
Id="RemoveRibbonButton"
Location="CommandUI.Ribbon">
<CommandUIExtension>
<CommandUIDefinitions>
<CommandUIDefinition
Location="Ribbon.Library.Actions.OpenWithExplorer" />
</CommandUIDefinitions>
</CommandUIExtension>
</CustomAction>
</Elements>
- Deploy the customization using SharePoint 2010 Management Shell (or Windows PowerShell): Install-SPFeature MyFeatureId Enable-SPFeature FeatureId -Url http://server/site/subsite (replace http://server/site/subsite on your site url)
No comments:
Post a Comment