Codeplex SPIEFolder

Pfff, it’s been a while again since my last post. I promise you guys that I will have some time soon to write more. Anyway…

This post to write about a cool tool that my colleague Pascal Rocheteau found today: SPIEFolder from codeplex.

Project Description
Allows you to either Import a file system folder (And all files and subfolders) into a SharePoint Document Library, and also export a SharePoint Document Library to the file system for
WSS 2.0/SPS2003 or WSS 3.0/MOSS 2007. This tool completely replicates the document libraries folder hierarchy to the file system when exporting, and replicates the folder hierarchy from the file system to the document library when importing.

Sounds really cool and usefull. Thanks Pascal for this


How to Ghost back or uncustomize customized Page Layouts

In followup of my previous post, today my favourite Microsoft Premier Support Engineer was asked to provide a way to unghost customized page layouts.
He came up with a little piece of code that does the trick in a C# Console application.

It must be getting clear to some of you that for administering SharePoint a knowledge of .Net development skills is becoming more and more a requirement….

The most important function of this piece of code depends on the method SPFile.RevertContentStream() which is described as: “Returns the file to its original uncustomized state so that its logic becomes cached in memory (also known as “ghosted”) rather than stored in the database.”

So, here it is. The folowing code will uncustomize the customized page layouts.

using System;
using Microsoft.SharePoint;
using Microsoft.SharePoint.Publishing;

namespace GhostLayoutPages
  class Program
    static void Main(string[] args)
      using (SPSite site = new SPSite(args[0].ToString()))
        using(SPWeb web = site.OpenWeb())
          PublishingSite pubSite = new PublishingSite(site);
          PageLayoutCollection pageColl = pubSite.PageLayouts;
          foreach (PageLayout layout in pageColl)
            SPFile currFile = web.GetFile(layout.ServerRelativeUrl);
            Console.WriteLine(“Layout page name: “ + layout.Name);
            Console.WriteLine(“Status before: “ + currFile.CustomizedPageStatus);
            Console.WriteLine(“Status after: “ + currFile.CustomizedPageStatus);

How to find all the customized master pages in a site collection

I got this question today from one of my collegues and needed to find the answer to it. Why did I get this question? Well one of our developper teqms provided a new solution to deploy that replaces the default master pages and the update did not show any difference after deployment. therefore we suspected that the master pages had somehow be customized which causes this behaviour.

My first hunch for finding the answer was SharePoint Designer and my favourite Microsoft Premier Support Engineer confirmed with the following article: Track Customized Master Pages

Basically you need to open the site collection using SharePoint Designer and run the Customized Pages report and apply a filter to show only the customized master pages

Below is the information that describes how to do this as grabbed from the Microsoft article

Run the Customized Pages report

For both Office SharePoint Server 2007 and Windows SharePoint Services 3.0, data for the reports generated by Microsoft Office SharePoint Designer 2007 is saved on the server on which the site is hosted. Server administrators can grant or deny access to these reports. If the reports generated come back empty, contact your server administrator for assistance. You must have at least Web Designer permissions on the server to open the site and run reports.

When you are working with an Office SharePoint Server 2007 or Windows SharePoint Services 3.0 site, you can easily use Office SharePoint Designer 2007 to run site reports that collect a variety of information about your site’s health, usage, and potential problems. To run a Customized Pages report:

  1. Open the Web site for which you want to run the report in Office SharePoint Designer 2007.
  2. On the Site menu, point to Reports, point to Shared Content, and then click Customized Pages.The report opens with all of the pages in the site listed, and the Customized column indicates whether content has been customized for that page. Note   A page is considered customized only if it is included in the original site definition. New pages created from a master page, new blank ASPX pages, and custom list forms that you create are not considered customized pages.


Filter the report to show only master pages

After you run the Customized Pages report, you may want to narrow it down to include only those pages in the site that are master pages, as shown in the following illustration.

  • To limit the results to master pages only, click the arrow next to the Type column heading, and then click master.

Filter the report to show only customized master pages

You can narrow the results even further to list only customized master pages, as shown in the following illustration.

  1. Click the arrow next to the Type column heading, and then click master.
  2. Click the arrow next to the Customized column heading, and then click Yes.

The report now lists only master pages that have been customized.

 Note   To remove any filter, click the arrow next to the column heading, and then click (All).

SWAT 2007

This is another one of those tools you should have on your SharePoint farm(s). Although the tool is aimed to designers of SharePoint solutions, I like to use it for deploying solutions to different or additional web applications without having to retract it first.

The official description, grabbed from the website states the following:

SharePoint Work Acceleration Toolkit (SWAT) is a windows based utility aimed at simplifying and accelerating the creation and testing of SharePoint Solutions. With a whole host of time saving capabilities and planned integration with Universal SharePoint Manager 2007, you’ll never want to take on SharePoint without it again.

SWAT Features and Capabilities:
Here is a short list of just some of the things SWAT can do. For a complete overview checkout the SWAT User Guide.

  • Site Diagramming
    • Show a Site Structure as a Diagram
    • Save a Site Structure Diagram as a Image
    • Save a Site Structure Diagram as a SVG file (for importing into Visio)
    • Print a Site Diagram
    • Drag and Drop the design of a Site Structure
  • Generate Test Data and Sites
    • Generate Random Sites for Testing
    • Auto Populate Lists/Libraries with Test Data (including Documents)
  • Work with SharePoint Logs
    • View SharePoint Log Files in a preview window
    • Group and Filter Log file entries
  • Work with Sites
    • Show a Site Structure in a Tree View (including security inheritence)
    • Create a Site Collection
    • Export and Import Site Structures
    • Backup and Restore Site Collections
    • View and Interact with site objects (Lists, Users, Roles, Features, Events, etc..)
    • Delete Sites and entire Site Structures
  • Work with SharePoint Features
    • View Feature Status in Farm and on a Site
    • Install and Uninstall Features
    • Activate and Deactivate Features
  • Work with SharePoint Solution Packages
    • Install and Deploy Solution Packages
    • View Solution Deployment Locations (Servers and Web Apps)
    • Deploy, Retract and Delete Solutions
  • Work with SharePoint Jobs
    • View Job Status
    • Add and Schedule Jobs
    • Enable and Disable Jobs
    • Force Execution of Jobs
  • Work with Event Receviers
    • Install Event Receivers for Sites and Lists
    • View and Manage Event Receivers
    • Delete Event Receivers
  • Work with Web Parts
    • Add (Deploy) Web Parts to multiple sites/pages
    • Replicate Web Parts
    • Delete Web Parts from multiple sites/pages

…and much much more!   These are just some of the features available in the SharePoint Work Acceleration Toolkit.

And now for the good part of this tool: ….. IT’S FREE

Read all about it here

Tim Dobrinski’s SharePoint Space Monitor

While searching through the Technet SharePoint forum, I stumbled upon a post/question regarding how to find out how much data your subsites are using. I remember from the SPS 2003 days that there was a aspx page that would show this ( _layouts/storman.aspx), which actually still exists in MOSS, but is accessible ony if you have a storage quota defined on the site collection (maybe it was also the case already in SPS, but I am not sure). It is accessible though the Site Settings page listed as a link called storage space allocation

Well, Tom Dobrinski developped a tool that allows you to get this information regardless of the fact if storage quotas are enabled or not. Even more he has made it available free of charge, but you are kindly suggested to make a small donation (5$) to get a everlasting key for the tool. Otherwise you will have to drop Tim a mail requesting a key every 4 months or so…

Go check his blog for the tool called the SharePoint Space Monitor if you think it might be usefull to you.

Extract the installed solutions from the MOSS farm (updated)

I was looking today for a way to get all the original wsp and cab files that have been installed into a MOSS farm. Of course not everybody keeps track of where the original files are the same way. Certainly if there is a team that is managing the same MOSS farms, your original files get lost very rapidly, or you can find the files on the filesystem, but there are so many versions of them. which one is the latest and the version installed?

So I was thinking that there should be a way to extract them from MOSS directly. Of course there is no OOTB way to do this, but I found some code that allows you to do it. The piece of code was posted on a Technet blog comment

I basically took this code and wrote a small Console Application around it so I could use it on my systems.

*** UPDATE March 23rd 2009***

Once I had created my little tool to extract the solutions, I noticed that it would also be great to know what the properties are of the solutions. Where were they deployed to, etc. Therefore I added some code to generate in addition to the solution files also a corresponding xml file containing that information

I will share my updated code:

using System;

using System.Collections.Generic;

using System.Text;

using Microsoft.SharePoint.Administration;

using System.Xml;


namespace SolutionExtractor


    class Program


        static void Main(string[] args)


            if (args.GetLength(0) == 0)


                Console.WriteLine(“Usage: SolutionExtracter.exe <path to save solution files>”);



            string path = args[0].ToString();


            bool checkIfDirExists = System.IO.Directory.Exists(path);

            if (checkIfDirExists == false)


                Console.WriteLine(“path “+path+ ” does not exist”);




            SPSolutionCollection solutions = SPFarm.Local.Solutions;


            foreach (SPSolution solution in solutions)


                SPPersistedFile wspFile = solution.SolutionFile;

                Console.WriteLine(“Saving “+path +“\\” + solution.Name);

                wspFile.SaveAs(path +“\\” + solution.Name);


                Console.WriteLine(“Saving properties to “ + path + “\\” + solution.Name + “.xml”);

                string filename = path + “\\” + solution.Name + “.xml”;

                XmlTextWriter tw =new XmlTextWriter(filename,null);//null represents the Encoding Type//

                tw.Formatting=Formatting.Indented;  //for xml tags to be indented//

                tw.WriteStartDocument();   //Indicates the starting of document (Required)//


                tw.WriteAttributeString(“Name”, solution.Name);


                tw.WriteElementString(“Added”, solution.Added.ToString());

                tw.WriteElementString(“ContainsCasPolicy”, solution.ContainsCasPolicy.ToString());

                tw.WriteElementString(“ContainsGlobalAssembly”, solution.ContainsGlobalAssembly.ToString());

                tw.WriteElementString(“ContainsWebApplicationResource”, solution.ContainsWebApplicationResource.ToString());

                tw.WriteElementString(“Deployed”, solution.Deployed.ToString());



                foreach(SPServer s in solution.DeployedServers)

                    tw.WriteElementString(“Server”, s.Name);



                tw.WriteElementString(“DeploymentState”, solution.DeploymentState.ToString());

                if (solution.DeploymentState.ToString().ToLower() != “globaldeployed”)



                    foreach (SPWebApplication w in solution.DeployedWebApplications)

                        tw.WriteElementString(“WebApplication”, w.Name);



                tw.WriteElementString(“IsWebPartPackage”, solution.IsWebPartPackage.ToString());

                tw.WriteElementString(“SolutionId”, solution.SolutionId.ToString());














So after running this code you will find all the solutions accompanied by an xml file with the properties like this:

 <?xml version=1.0?>
Solution Name=mySolution.wsp>
WebApplication>SharePoint – WebApp1</WebApplication>
WebApplication>SharePoint – WebApp2</WebApplication>

For Those of you that do not want to start developping or compiling this peace of code, you can download an updated compressed version of it attached to this post.

Short overview of MOSS new installation order with Language Packs

Just wanted to add this to my blog, because I have been asked this twice already last week. The order below is the one I use when I have to install Language Packs. Basically I prefer installing in the same order as the updates have been released. In Belgium we are customed to install 3 languages: English, Dutch and French. Hence this post

First of all install the prerequisite software for Windows Server 2003:

IIS 6.0
Asp.Net 2.0
.Net Framework 3.0

Then start the installation of MOSS and updates:

Install MOSS (English and without SP1)
Install WSS language pack French x86 x64
Install MOSS language pack French x86 x64
Install WSS language pack Dutch x86 x64
Install MOSS language pack Dutch x86 x64
install WSS 3.0 SP1  x86 x64
install Moss 2007 SP1 x86 x64
Install WSS SP1 language pack French x86 x64
Install MOSS SP1 language pack French x86 x64
Install WSS SP1 language pack Dutch x86 x64
Install MOSS SP1 language pack Dutch x86 x64
Install Post-SP1 WSS Infrastructure update x86 x64
Install Post-SP1 MOSS infrastructure update x86 x64

I have added the link to the MS download site for each individual update as requested by a colleague of mine.

Remember that you do not need the Configuration Wizard at each step. Some of the updates automatically start the wizard. Just simply cancel it out and continue installing the rest of the updates. What I always try to keep in mind is to install the updates for WSS first and then continue withthe MOSS counterpart.

Another little thing to remember is that you can get the language packs form the Microsoft download site for free.

Change the default 10 MB limit for saving a site as template

I bumped upon this 10 MB limit today when trying to save a site as a template. Did some research on the net and found that you can change this limit through the following stsadm command:

stsadm -o setproperty -pn max-template-document-size -pv 524288000

This will set a 500 MB limit instead, which is apparently the maximum value you can specify. 

Changing a web application URL and dealing with requests for the old URL by Brendan Griffin

This post was found on the From the Field Blog and was posted by Brendan Griffin


I recently had a discussion with a customer who was planning on changing the URL of their MOSS 2007 Intranet Web application. This is generally a straightforward procedure that is easily achieved either by amending the alternate access mapping configuration of the web application in question OR extending the web application into a new zone. The customer was comfortable with this and had a plan in place for this change.  In this particular case the customer wanted to change the URL from to

The customer was particularly concerned about the the myriad of links that end users had to content that was held in Internet Explorer favorites’ and embedded in work documents that referenced the old URL – and they wanted to put a mechanism in place that would automatically redirect end users to the new URL when a link that referenced the old URL was selected.

For example a user could click a link that referenced a site collection named Marketing using the URL they wanted this to be automatically redirected to

This objective was easily achieved using a redirect site in IIS 6.0 and involved the following steps.

·         Creating a new website in IIS on each WFE in the farm using the default application pool as it has no need to communicate with any component of MOSS 2007.

·         Configuring the redirect site to listen on the host header (it’s important the MOSS 2007 specific configuration changes are performed prior to this to avoid any conflicts in IIS)

·         Selecting the Home Directory tab of the properties of the redirect site and selecting the following settings, this not only redirects the host name portion of the URL but also the path within the URL 🙂 using the $S and $Q variables. A full reference on these variables can be found at –

Thanks Brendan for sharing!

Adobe PDF iFilter 64 bit finally released spotted by Brendan Griffin


I just came across a post by Brendan Griffin on the From the Field Blog ( great blog by the way!) about this long awaited release of a 64bit iFilter for pdf from Adobe. It is finally there. Read more about it on 

The installation procedure for SharePoint is available which requires you to play around in the registry to make it actually work.

This release will probably be bad and sad news for Foxit Software that was until now one of the only suppliers of a 64bit PDF iFilter on the market.