建议:多看其它网站:(只列出前八大最佳)
http://www.zarr.net
http://www.vbhelp.bet
http://www.21code.com
http://www.vbthunder.com
http://www.easthot.net
http://www.freevbcode.com
http://www.vbaccelerator.com
http://jinesc.6600.org

解决方案 »

  1.   

    '''''''''''''''''''''''''''''''''
    Option Explicit
    On Error Resume Next'''''''''''''''''''''''
    ' First, open the path to the Web server you are
    ' trying to add a virtual directory to.
    function CreateVirtualDir()
    Dim ServObj
    Dim VdirObj
    Dim TestpathSet ServObj = GetObject("IIS://LocalHost/w3svc/1/Root")
    if (Err <>0) then
       debug.print "GetObject (""IIS://LocalHost/w3svc/1/Root"") Failed! <br>"
       debug.print "Error! " & Err.Number & "(" & Hex(Err.Number) & "): " & Err.Description & "<br>"
       exit function
    end if'''''''''''''''''''''''
    ' Second, Create the virtual directory (Vdir) path
    Set VdirObj = ServObj.Create("IIsWebVirtualDir", "MyVdir")
    VdirObj.SetInfo
    if (Err<>0) then
       debug.print "CreateObject(""IIS://LocalHost/w3svc/1/Root/MyVdir"") Failed!"
       debug.print "Error! " & Err.Number & "(" & Hex (Err.Number) & "): " & Err.Description &
       exit function
    end if''''''''''''''''''''''''
    ' Finally, create a Path variable containing the virtual root path and
    ' set the permissions to read, script, and directory browsing
    VdirObj.AccessRead = True
    VdirObj.AccessScript = True
    VdirObj.EnableDirBrowsing = True
    Testpath = "C:\Temp"
    VdirObj.Put "Path", (Testpath)VdirObj.SetInfo
    if (Err<> 0) then
       debug.print "Put (""Path"") Failed!"
       debug.print "Error! " & Err.Number & "(" & Hex (Err.Number) & "): " & Err.Description &
    else
       debug.print "VDIR successfully created"
    end if''''''''''''''''''''''''
    ' The minimum amount necessary to create a virtual directory has now
    ' been completed.  If you need to add more, do it here.
    end function
      

  2.   

    非常感谢你,yonghengdizhen(偶不喝板蓝根,偶学过三个代表,死不了!)
      

  3.   

    MSDN上的东西多的是..做MS的开发,学会了查找MSDN,你已经成功了一半..所以,在这里提问的很多兄弟,提问之前,你查过MSDN吗????