怎么用PB在IIS内建立网站

如何用PB在IIS内建立网站
各位大侠请帮帮忙。我在用PB做安装程序的时候遇到一个问题,就是需要在IIS中创建网站,然后在该网站下安装程序。利用PB代码创建虚拟目录我知道如何做,但创建网站再设置属性就不知道了,查了很多资料都查不到,请各位高手帮帮忙,最好能给点代码。
多谢多谢

------解决方案--------------------
如果用pb11的话,可以用.net代码来实现

C# code


#IF DEFINED PBWEBFORM THEN     
    String constIISWebSiteRoot = "IIS://localhost/ftpmanager"
    String virtualDirName = 'Test2010'
    String virtualDirPath = 'Test2012'
    System.DirectoryServices.DirectoryEntry root
    root = create System.DirectoryServices.DirectoryEntry(constIISWebSiteRoot)
    System.DirectoryServices.DirectoryEntry entry
    entry = create System.DirectoryServices.DirectoryEntry(constIISWebSiteRoot + "/" + virtualDirName);
    
    System.DirectoryServices.DirectoryEntry tbEntry
    tbentry = root.Children.Add(virtualDirName, "IIsWebVirtualDir");
    
    tbEntry.Properties["Path"][0] = virtualDirPath;
    tbEntry.Invoke("AppCreate", true);
    tbEntry.Properties["AccessRead"][0] = true;
    tbEntry.Properties["ContentIndexed"][0] = false;
    tbEntry.Properties["DefaultDoc"][0] = "index.asp";
    tbEntry.Properties["AppFriendlyName"][0] = virtualDirName;
    tbEntry.Properties["AppIsolated"][0] = 2;
    tbEntry.Properties["AccessScript"][0] = true;   
    tbEntry.Properties["DontLog"][0] = true;   
    
    tbEntry.CommitChanges();
#End if