Hacking Avalon – 2: Port it

Always wanted to experiment with Avalon on Windows XP? In this second part of the ‘Hacking Avalon’ series we’re going to install not only Avalon but also some other Longhorn component. In this post I will take Windows XP as example, but the installer is also compatible with Server 2003.  Below is a description of the included components and their use.



This will install the Longhorn Avalon runtime to your computer. You will be able to run any Avalon application and XAML files compatible with 3683. The Avalon compiler is also included for you to build your own Avalon applications (later more on this in another post).


Includes all the files needed to display the sidebar. To get the actual sidebar working you will still need to manually patch explorer. Which is something that can’t easily be done.


Installs the ‘My Games’ subsystem and file-type declaration for game definition files (GDF). This feature is already pretty much broken in 3683 itself so don’t expect too much.


Installs the WinFS SQL Server.  Since neither Windows XP nor Server 2003 include any user interface for adding metadata to files or for viewing the virtual folders WinFS provides it pretty pointless to use and will mainly be a resource hog.


How does the installer work?

Since many features in Longhorn were originally being developer separately from the operating system they were available as component. The component system in early Longhorn builds is the same as the system found in Windows XP and Server 2003. This makes it extremely easy to install a given component on another version of Windows. ‘Porting’ of the component now comes down to copying the right files and creating a bootstrapper for the component wizard. The Windows Component Wizard does all the heavy lifting; renaming files, registering assemblies and so on.


Using the installer

Before using the Longhorn feature installer, be sure to install .NET framework version 1. You can download the redistributable here.

  1. Extract the zip –Make sure the path to this directory contains no spaces or the installer will break
  2. Execute AvalonInstallWrapper.bat
  3. Wait for the installer to copy some files
  4. A Windows Component Wizard will appear
  5. Select the components you wish to install
  6. When prompted for a directory, point to the LonghornFiles directory in the extracted folder
  7. Wait for the wizard to finish



Things to try after installation

Now have your very own Longhornified Windows installation there are some things you definitely have to try:

Create a XAML file

XAML files are normally unsupported in Windows XP, but since you just installed Avalon you can open them using Avalon’s shell handler. Clicking a XAML file will open an Internet Explorer window and render the contents of the file. If your XAML file was empty you will be greeted by an Avalon stacktrace complaining about how empty your file is. The download below contains a valid ‘hello world’ XAML file for you to try.

The power of WinFS

Start the ‘Windows Future Storage’ and ‘Windows File Promotion Manager’ services from services.msc. WinFS will start indexing files on the file system and drop a ~DirDB file in the root of your main drive. This is the database containing all indexed file on your. Open task manager and see the huge amounts of RAM WinFS is chewing away on while indexing your files.

Game definitions

In the zip below you will find a Longhorn game definition file. With mygames installed this file will appear as a game and has some extra options in the right-click context menu.


  9 comments for “Hacking Avalon – 2: Port it

  1. 16th May 2016 at 9:21 am

    I get an error “Invalid amount of parameters” error and then the setup says that everthing should be intstalled now.

    • Melcher
      26th May 2016 at 4:12 pm

      You probably didn’t run the installer from a location of which the patch contained no spaces. Make sure to run it from the root of C or something. That should work.

      • Bondy
        19th January 2017 at 12:03 am

        I had an issue even though I had all the files in the C: directory. It was saying invalid program arguments were specified. it was talking about the /i command for the master inf.
        Windows XP 32-Bit SP3 (5.1)

        • Melcher
          19th January 2017 at 10:37 am

          I’m not sure what could be causing that issue. Somehow the call the script makes to sysocmgr with the /i parameter fails.

        • Bondy
          22nd January 2017 at 5:10 am

          I just spotted a bug in the code. The code in the batch file is: “sysocmgr /i: %cd%\setup.inf”
          But the code that worked for me was “sysocmgr /i:%cd%\setup.inf” no space between “/i:” and “%cd%\setup.inf”. Thought I’d better point that out.

  2. TrumpFan101
    17th June 2016 at 9:33 pm

    How do I manually patch explorer to use the sidebar?!?

    • Melcher
      3rd July 2016 at 8:53 am

      You’ll have to find a way yourself. I don’t think it’ll be easy to do.

      • John
        8th February 2018 at 9:29 pm

        How about you create a program that loads the sidebar?

        • Melcher
          26th March 2018 at 2:59 pm

          Actually, that’s a pretty good idea and something that’s doable. I’ve done it in the past. Will post about it in the near future.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.