A client of mine recently had a request to prevent users from opening a document library in Explorer view. After some time and research it turns out that the Explorer view leverages WebDav to do its thing. This presented a problem, WebDav is needed in SharePoint to perform many of the client side tasks such as opening a file in the Office Clients (i.e. Word, Excel, InfoPath, etc.) so removing it would have cause much of the great collaboration functionality we have known to grow and love in SharePoint 2010 to be crippled. This was clearly not an acceptable solution. The only other option was to prevent users from having the option to “Open with Explorer”. This option presents itself in the ribbon in the Library tab.
The “Open with Explorer” option is a custom action on the ribbon and the proper way to remove it is to create a feature which hides this option. The following links outline how to create a new custom action and the location of many of the common OOB actions in case you need to modify one of these items.
How to: Modify the User Interface Using Custom Actions -
http://msdn.microsoft.com/en-us/library/ms473643.aspx
Default Server Ribbon Customization Locations -
http://msdn.microsoft.com/en-us/library/ee537543.aspx
The steps to create a new custom action are:
1. Create a new SharePoint project with VS2010.
2. Add a new “Empty Element” to the project.
3. Modify the Elemnet.xml for the new Empty Element to include the following markup
<CustomAction Id="KMSHideExplorerView" Location="CommandUI.Ribbon"> <CommandUIExtension> <CommandUIDefinitions> <CommandUIDefinition Location="Ribbon.Library.Actions.OpenWithExplorer" /> </CommandUIDefinitions> </CommandUIExtension> </CustomAction>
<CustomAction
Id="KMSHideExplorerView"
Location="CommandUI.Ribbon">
<CommandUIExtension>
<CommandUIDefinitions>
<CommandUIDefinition
Location="Ribbon.Library.Actions.OpenWithExplorer" />
</CommandUIDefinitions>
</CommandUIExtension>
</CustomAction>
4. Package this new element in a SharePoint Feature and deploy.
Once deployed navigate to a document library and open the “Library” tab in the ribbon. the “Open with Explorer” option and its associated icons should now be gone.