In a previous post, I mentioned having an issue deploying SharePoint solution files to a non-12 Hive locations on all web front ends (WFEs). The problem I faced was that WSPBuilder doesn’t allow me to edit the manifest.xml file (reference, near bottom) and my custom code to copy the files was successful, but only executing on the WFE from which the feature activation command was being called. Once we moved to a multiple WFE environment all of the other WFEs were missing files.
The always helpful Sean McDonough suggested that I use an SharePoint Timer job because that will execute code on all WFEs. I had never built a custom timer job so I researched the links Sean shared and dove head first into it. I had moderate success but ran into an issue with the account running my timer job (which ended up being the Farm Access account) not having write permissions to the non-12 Hive location as it was not a local admin on every WFE in the farm. The solution to that problem (another blog post forthcoming on solving that ACL permission issue) was looping through the WFEs during feature activation. As it turns out, discovering that I could loop through each WFE led to a much simpler solution to my original problem. Any of you familiar with Occam’s Razor (also spelled Ockham) will realize that simpler solutions are almost always the better solution. So instead of wiring up a feature to set write permissions, then store needed values in a property bag, and then kick off a timer job I went with a much simpler solution. Below is a code snippet for how to deploy SharePoint solution files to a non-12 Hive location on multiple web front ends without using a timer job (wow that’s a mouthful.)
The files I am deploying are a set of support files for the RadEditor for MOSS Lite Edition that need to live in the “wpresources” folder (which is a sibling folder of the 12-Hive.) I originally deploy the files to a subfolder “Support Files” of the feature root folder. From there they are copied to the appropriate location within “wpresources”. You may also download the code snippet from my SkyDrive here.
As far as I can tell my research didn’t turn up any other results on this topic so this may be me blazing some trails on the subject matter. If you have any questions, comments, or feedback please feel free to leave some below. I’ll update this post with a link to my forthcoming post on setting ACL permissions during feature activate. Happy SharePointing.