You are using late binding with the CreateObject() function. You want to steal, beg or borrow a copy of VS2010 to use the C# 4.0 dynamic keyword to make that easy to do. Here's similar code that works on any machine. It uses late binding to create the FileSystemObject COM component, the first two lines are equivalent to your code snippet. It lists the subdirectories of the c:\windows folder:
using System;
class Program {
static void Main(string[] args) {
var type = Type.GetTypeFromProgID("Scripting.FileSystemObject");
dynamic obj = Activator.CreateInstance(type);
dynamic win = obj.GetFolder("c:/windows");
foreach (dynamic subwin in win.SubFolders) {
Console.WriteLine(subwin.Name);
}
Console.ReadLine();
}
}
If you can't use C# version 4 then consider using VB.NET instead. It has the same syntax and also has a CreateObject() function.